# Cronjobs v1.0 (C) 2012 Domero # Here is a simple config to add, edit, enable or disable cronjobs # Become root # Add cronjobs.cgi to /var/lib/cronjobs (mkdir) # Chmod 700 /var/lib/cronjobs/cronjobs.cgi # Type Crontab -e # Set Crontab to: */1 * * * * /var/lib/cronjobs/cronjobs.cgi >/dev/null 2>&1 # Logs are in /var/log/cronjobs.log # There are 2 types of cronjobs, those which will be executed every time, # and those who check if a process is running, and will restart it. # This is done with the 'keepalive' switch. If you don't want a cronjob # to be started, when e.g. working on it, set the 'block' switch to 1. # Saving this file will automatically enable all changes made. # Test it by running /var/lib/cronjobs/cronjobs.cgi in your console!! # Running multiple processes under the same name requires a PID-file explicitely for each process! # This is an example of a cronjob setting: # cronjob here a name { # block = 1/0 # (enable/disable cronjob; default=0) # keepalive = 1/0 # (enable/disable the check-if-running-before-start option; default=1) # time = minutes to check/execute the cronjob (default=1) # abstime = hours:minutes (24 hours format; optional; and wont work in keepalive=1 mode; this switch will overrule time; ideal for daily backups) # path = /relative/path/where/you/want/the/prosess/running/from # process = /dir/where/process/is/process.ext [-switches] (obligated) # pid = /dir/where/pidfile/is/file.pid (optional) # user = user under which process must be run (default=root) # screen = name of screen to run process in (leavy empty for none) # verbose = 1/0 (enable/disable output of the startup of the process in the logfile; default=1) # } cronjob lightIRCFlashPolicyD { block = 1 keepalive = 0 process = /home/flashpolicyd/flashpolicyd.rb --xml /home/flashpolicyd/flashpolicy.xml --logfile /var/log/flashpolicyd.log --port 8843 && echo `pidof ruby` > /home/flashpolicyd/flashpolicyd.pid pid = /home/flashpolicyd/flashpolicyd.pid user = flashpolicyd verbose = 0q time = 900 }