Cron is a lovely scheduler for Linux.

To check Cron is running, type the following :-

ps -ef | grep cron | grep -v grep

If nothing is returned, cron is not running, but worry not, it is easily started by typing :-

crond

To add/edit a cron schedule, type :-

crontab -e

The format of the file for crons is :-

Minute Hour DayOfMonth Month DayOfWeek Command

3          1             *                  *              *            /home/test.sh &> /dev/null

The above will run the file /home/test.sh at 01:03 each day.  To run a task every 5 minutes you would use :-

Minute Hour DayOfMonth Month DayOfWeek Command

*/5          *             *                  *              *            /home/test.sh &> /dev/null

The “&> /dev/null” redirects output to null, you can change this to be a logfile if you want.

To view/list all scheduled task for you user type :-

crontab -l