For CentOS 7 servers, this seems to be the syntax that works for me. Please note the spaces around the [ and ]. That took a while for me to figure out.
This runs the test.sh file at 13:07 / 1:07PM on the second Wednesday of the month.
(0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, etc.)
07 13 8-14 * * [ `date +\%u` = 3 ] && /root/scripts/test.sh
The sandbox is preventing you from writing the crontab. If you run the crontab command…
using Terminal on local machine: System Preferences > Security & Privacy and give Full Disk Access to Terminal
using a third party terminal app: System Preferences > Security & Privacy and give Full Disk Access to third party terminal app
via ssh from another ...
Instead run the www script from a root script
su www-data -c /var/scripts/update-web.sh
Make a script like that and run it from root's crontab,
and remove the entry from www-data's crontab.
As a commenter mentioned, you're calling the wrong program. The reboot binary is at /sbin/reboot, not at /usr/bin/reboot. The latter is a symbolic link to consolehelper, which is a wrapper that lets non-root users run the corresponding program in /sbin under certain circumstances. You can see its man page if you're really interested in how it works, but as ...
If you get option "keep_environment" unknown, then most likely your exim doesn't have a certain security fix.
The fix was made in 4.86.2. But also backported to 4.84.2. Both Jessie and Stretch have it. It cleans the environment according to keep_environment, add_environment options. If keep_environment is not set, it logs a warning and suggests to add it. ...