linux poison RSS
linux poison Email

How To setup "Cron" job

To edit or create a new cron jobs
$ crontab -e

You may want to put in the following header

#MINUTE(0-59) HOUR(0-23) DAYOFMONTH(1-31) MONTHOFYEAR(1-12) DAYOFWEEK(0-6) Note 0=Sun and 7=Sun
#
#14,15 10 * * 0 /usr/bin/somecommmand >/dev/null 2>&1

The sample “commented out command” will run at 10:14 and 10:15 every Sunday. There will
be no “mail” sent to the user because of the “>/dev/null 2>&1″ entry.

$ crontab -l

The above will list all cron jobs. Or if you’re root

Reference “man 5 crontab”:


1 comments:

Unknown said...

An article explaining the Linux cronjob scheduling in detail with the help of examples.

http://www.thegeekscope.com/linux-cron-job-scheduler/

Hope you will find this post useful !

Post a Comment

Related Posts with Thumbnails