Am 05.02.2015 um 09:21 schrieb LuKreme:
On Feb 5, 2015, at 1:03 AM, Bob Proulx <b...@proulx.com> wrote:LuKreme wrote:The front actin simply calls sa-update. Do I just 16 1 * * * PATH=/usr/bin:/bin:/usr/local/bin /usr/local/bin/sa-update && /usr/local/bin/sa-compile && /usr/local/etc/rc.d/sa-spamd restart ? Or is there a reason not to do that?The syntax "variable=value command" is a /bin/sh syntax which sets the variable for just that command. In the above sa-update would get the PATH setting. But then && terminates that command.I’m actually not positive that is the case. The && syntax chains the commands into a dependent chain (sa-update only triggers if sa-update succeeded and sa-spamd restart only triggers if both previous commands succeeded, so it would certainly make sense that some state like setting variables is preserver. Haven’t tested this, but it’s pretty trivial.
the && does nothing than start one command only if the following with a 0 return value and that's it - no other magic involved
did you look on top of the crontab?normally there is PATH set and so if you install stuff to /usr/local it's likely a good ide to have it in PATH too
[root@srv-rhsoft:~]$ cat /etc/crontab SHELL=/usr/bin/bash PATH=/usr/bin:/usr/sbin LANG=en_GB.UTF-8 MAILTO=root HOME=/ PODCAST_THREADS=6
signature.asc
Description: OpenPGP digital signature