Friday, February 13, 2009

How to add custom cron jobs

Endian Firewall provides a couple of hook directories where you can put your scripts which should run as custom cron job. The cron process will start each script which resides within the respective hook directory.

Cron Job Scripts

Your custom cron job scripts will not be altered by Endian Firewall scripts or the upgrade process.

The scripts need to be:

executable (chmod 700)
should exit with errorcode 0
must not contain a dot within the filename
must end within a measurable time, otherwise put the process in background or it will delay all other jobs.
Cron Hooks

The directories beginning with cron will be started at a precisely configured time. The following presets will be provided as hooks:

/etc/cron.cyclic/
Will start every 5 minutes (i.e: 2:05, 3:10, 3:15)

/etc/cron.minutely/
Will start every minute (i,e: 2:01, 2:02, 3:30)
/etc/cron.hourly/
Will start every hour, one minute after full hour (i.e: 2:01, 3:01, 4:01).
/etc/cron.daily/
Will start every day at 1:25am.
/etc/cron.weekly/
Will start every week at Sunday 2:47am.
/etc/cron.monthly/
Will start every month at 3:52am of the first day of the month.
Directories beginning with anacron provide defined periodical time terms which start measurement from when the fcron process has been started. This can be used when you don't want to have a job run at a precisely specified time, but at random time terms with well defined intervals. The following hooks will be provided:
/etc/anacron.cyclic/ (every 5 minutes)
/etc/anacron.hourly/ (ever hour)

/etc/anacron.daily/ (every day)

/etc/anacron.weekly/ (every week)

/etc/anacron.monthly (every month)


http://kb.endian.com/entry/43/

0 comments:

Twitter Delicious Facebook Digg Stumbleupon Favorites More