- Get link
- X
- Other Apps
AT UTILITY
Eg
$ at now +3 days COMMAND
From the man-pages:
DESCRIPTION
at and batch read commands from standard input or a specified file which are to be executed at later time, using /bin/sh.
at executes commands at a specified time.
atq lists the user's pending jobs, unless the user is the superuser; in that case, everybody's jobs are listed. The format of the output lines (one for each job) is: Job number, date, hour, queue, and username.
atrm deletes jobs, identified by their job number.
batch executes commands when system load levels permit; in other words, when the load average drops below 1.5, or the value specified in the invocation of atd.
CRON UTILITY
cron refers to a configuration file called /etc/crontab to execute a series of bash commands.
crontab -e opens the crontab editor to edit existing jobs or to create new jobs. Each line of the crontab file contains 6 fields.
FIELD - DESCRIPTION - VALUES
MIN - Minutes - 0 to 59
HOUR - Hour field - 0 to 23
DOM - Day of Month - 1-31
MON - Month field - 1-12
DOW - Day Of Week - 0-6 (0 = Sunday)
CMD - Command - Any command to be executed
* = All range of values
Example
0 08 10 06 * /home/sysadmin/full-backup.sh executes full-backup.sh at 8.30 a.m., 10-June, any day of the week
SLEEP COMMAND
From man page:
NAME
sleep - delay for a specified amount of time
SYNOPSIS
$ sleep NUMBER[SUFFIX]...
$ sleep OPTION
DESCRIPTION
Pause for NUMBER seconds. SUFFIX may be 's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days. NUMBER need not be an integer. Given two or more arguments, pause for the amount of time specified by the sum of their values.
Comments
Post a Comment