cmwcronrunner


NAME

cmwcronrunner - wrapper around Communiware cron jobs


SYNOPSIS

cmwcronrunner [-n] [-c conffile] id period


DESCRIPTION

This script intended as a ``wrapper'' around tasks runned from Communiware crontab. It takes two arguments - id of cronjob to run (this is value of ``id'' attribute corresponding ``cronjob'' tag in used config file) and value of period, which may be ``monthly'', ``weekly'', ``daily'', ``hourly'', ``hour2'' (once a half an hour) and ``hour4'' (once a quarter an hour).

Script reads Communiware config file (alternate config file can be set by -c option) and assembles command line to execute.

If -n option is given then script prints assembled command line and exits. Otherwise it runs cronjob command as a child process, catches its output (if it is necessary) and prints it into a log file. It keeps logfile opened only when reads data for logging.

Besides this the script sets environment variables needed for cronjob executing.

16 октябрь 2007 13:45