Cron config for ipfw table
jerry at seibercom.net
Fri Apr 10 12:39:08 UTC 2020
On Fri, 10 Apr 2020 13:51:51 +0200, Jos Chrispijn commented:
>I have added a line to my crontab that defines running a script on
>@reboot bash /root/cronjobs/reboot.sh &
>This (bash) .sh script should add an updated ipfw table (preventing I
>have to run his action manually) but unfortunately no script is
>executed on reboot.
>- script is executable
>- no action is mentioned in /var/log/cron
>Can you tell me what I do wrong here? Perhaps scheduling this action
>_after_ reboot would be the solution?
I run several programs upon reboot also. However, I never use "bash" as
part of the command.
Assuming you have the correct "shebang" in th script, you could just use
@reboot /root/cronjobs/reboot.sh &
However, I am not sure you need the "&". All cron jobs are run in the
background. You might check out this URL:
I would make sure you have the right 'shebang' in the script then
remove both 'bash' and the '&' from the command line and see what
transpires. You could also experiment with adding "&> /dev/null" sans
the quotation marks to the end of the command. By the way, you did make
sure that the script is executable, I assume.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 488 bytes
Desc: OpenPGP digital signature
More information about the freebsd-questions