Cron UNIX/Linux service

Cron UNIX/Linux service | Javamazon:


Cron is UNIX/Linux service or daemon to execute scheduled commands. It is also known as the clock daemon that executes commands at specified dates and times according to instructions in a file.
Generally, crontab uses a daemon, crond, which runs constantly in the background and checks once a minute to see if any of the scheduled jobs need to be executed. If so, it executes them. These jobs are generally referred to as cron jobs.
Cron is controlled by a set of files called “crontabs”. There is the master file in /etc/crontab. Each users cronjob is stored in /var/spool/cron/username directory.
setting up your own job
$ crontab -e
To start the cron service, use:
# /etc/init.d/crond start
To stop the cron service, use:
# /etc/init.d/crond stop
To restart the cron service, use:
# /etc/init.d/crond restart

0 comments:

Post a Comment