Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
97 views2 pages

5.1 MasteringLinuxCommandLine-13-Schedular

The document discusses different methods for scheduling jobs in Linux: - at allows one-time execution at a later time. batch is similar but runs when the system is less busy. - cron allows one-time or recurring jobs and uses the crontab file to specify the schedule. The crontab file defines the minute, hour, day of month, month, and day of week that a command will run. - Examples show running a backup script every day at 5:00 and every 5 minutes from 3-12 on the 15th day of months 3, 6, 9, and 12.

Uploaded by

amit_post2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views2 pages

5.1 MasteringLinuxCommandLine-13-Schedular

The document discusses different methods for scheduling jobs in Linux: - at allows one-time execution at a later time. batch is similar but runs when the system is less busy. - cron allows one-time or recurring jobs and uses the crontab file to specify the schedule. The crontab file defines the minute, hour, day of month, month, and day of week that a command will run. - Examples show running a backup script every day at 5:00 and every 5 minutes from 3-12 on the 15th day of months 3, 6, 9, and 12.

Uploaded by

amit_post2000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Mastering Linux Command Line 11/19/2019

Mastering Linux Command-line

Scheduling Jobs
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

Scheduling Jobs
 at at: One-time execution at a later time.

 batch batch: One-time execution at a later time,


when the system is under less load.

 cron
cron: one-time or recurring

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

cron & crontab


 cron  daemon that handles cron jobs

root 1386 1 0 09:04 ? 00:00:01 /usr/sbin/crond -n

 crontab  file that contains the instructions to execute a task periodically

Minute Hour Day of the month Month Day of the week Command to execute

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

www.GlobaleTraining.com 1
Mastering Linux Command Line 11/19/2019

0 = Sunday

Crontab layout 1 = Monday


.
.
7 = Sunday
Command
0-59 1-31 0-7 To Run

Minute Hour Day of the month Month Day of the week Command to execute

0-23 1-12

Purpose Example Meaning


* Any Value Minute: * Every minute
, Value separator Minute: 5,10 5th and 10th Minute
- Range Month: 1-6 First 6 months (Jan thru June)
/ Step values Minute: */5 Every 5th minute
Hour: */4 Every 4th hour
GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

Crontab layout

Minute Hour Day of the month Month Day of the week Command to execute

0 5 * * * ./backup.sh

*/5 */3 15 3,6,9,12 * ./backup.sh

GlobalETraining.com
Mastering Linux Command Line GlobaleTraining.com

www.GlobaleTraining.com 2

You might also like