Crontab Tip

On Fedora based system, whenever I need help writing a cron task and confused which field is minute, hour, day,..etc, I usually check the /etc/crontab file. ❯ cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | ....

December 13, 2020 · 1 min · 164 words · kenno

How to test cron

So you drop a script in /etc/cron.daily. How to check if that script does what it is expected to do without having to wait, in this case, a day? Here is how: # run-parts -v /etc/cron.daily Reference: http://stackoverflow.com/questions/4984725/how-to-test-cron-job

February 18, 2014 · 1 min · 38 words · kenno

Install crontab on CentOS 6

When you install CentOS 6 using minimal CD, a lot of packages aren’t installed by default; <strong>cron</strong> included. To install it, After the installation, you can verify that crond is running:

May 27, 2013 · 1 min · 31 words · kenno