...
Step-by-step guide
Option #1
create a file below
/omd/sites/mysite/etc/cron.d
with your new cronjob, e.g./omd/sites/mysite/etc/cron.d/myjob
Code Block language bash theme RDark # My cronjob */5 * * * * $OMD_ROOT/local/myjob --params >/dev/null 2>&1
execute 'omd reload crontab' to rebuild this file from/omd/sites/mysite/etc/cron.d/*
Code Block language bash theme RDark root@linux:~# omd reload crontab
Option #2
- The second possibility is to create a systemwide cronjob below
/etc/cron.d
, e.g./etc/cron.d/myjob
. Note the slightly different syntax: the 6th column (after the time settings) requires the user under which this cronjob is executed. Also, the environment variables $OMD_ROOT and such are not available (unless you set them explicitly in this file):
...