New answers tagged

1

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


0

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 ...


0

Have you tried putting the user into the /etc/cron.allow file (create it yourself, if it doesn't exist, yet)? http://www.madirish.net/294


1

Instead run the www script from a root script #!/bin/sh su www-data -c /var/scripts/update-web.sh /var/scripts/clear-cache.sh Make a script like that and run it from root's crontab, and remove the entry from www-data's crontab.


2

Unescaped percent signs in the command are replaced by newlines, see crontab(5). You need to put a backslash in front of them.


1

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 ...


0

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. ...


Top 50 recent answers are included