Terminal 101: Creating Cron Jobs

3

Comments

+ Add a Comment
avatar

dr3van

The correct line to run every 30 minutes would be:

*/30 * * * * /path/to/./script

Every 15 minutes would be:

*/15 * * * * /path/to/./script

If you wanted it to run at an.offset time you could run:

5,20,35,50 * * * * /path/to/./script

The last example would run at the :05 :20 :35 & :50 of every hour

avatar

Nadine

Anyone gets stuck with cron job setting may try a cron job generator at crontab-generator.org.

avatar

caseyWebb

If you wanted the job to run every 30 minutes, you could use the following sequence:

30 * * * *

This code would run once an hour at the 30 minute mark, not every 30 minutes; i.e. 1:30, 2:30, 3:30, et al.

Thanks for the article,
Cheers

Log in to Mac|Life directly or log in using Facebook

Forgot your username or password?
Click here for help.

Login with Facebook
Log in using Facebook to share comments and articles easily with your Facebook feed.