diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc index efbc41598..e8ee16586 100644 --- a/src/etc/inc/system.inc +++ b/src/etc/inc/system.inc @@ -1269,6 +1269,10 @@ function system_cron_configure($verbose = false, $defer = false) } $crontab_contents = "# DO NOT EDIT THIS FILE -- OPNsense auto-generated file\n"; + $crontab_contents .= "#\n"; + $crontab_contents .= "# User-defined crontab files can be loaded via /etc/cron.d\n"; + $crontab_contents .= "# or /usr/local/etc/cron.d and follow the same format as\n"; + $crontab_contents .= "# /etc/crontab, see the crontab(5) manual page.\n"; $crontab_contents .= "SHELL=/bin/sh\n"; $crontab_contents .= "PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin\n"; $crontab_contents .= "#minute\thour\tmday\tmonth\twday\tcommand\n"; diff --git a/src/opnsense/service/templates/OPNsense/Cron/user.cron b/src/opnsense/service/templates/OPNsense/Cron/user.cron index ba59e6671..405854532 100644 --- a/src/opnsense/service/templates/OPNsense/Cron/user.cron +++ b/src/opnsense/service/templates/OPNsense/Cron/user.cron @@ -1,4 +1,8 @@ # DO NOT EDIT THIS FILE -- OPNsense auto-generated file +# +# User-defined crontab files can be loaded via /etc/cron.d +# or /usr/local/etc/cron.d and follow the same format as +# /etc/crontab, see the crontab(5) manual page. SHELL=/bin/sh PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin {% if helpers.exists('OPNsense.cron.jobs') %}