[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Add "nice -10" to /etc/crontab run-parts commands?



On Mon, May 31, 1999 at 11:09:31PM +0300, Tommi Virtanen wrote:
>On Sun, May 30, 1999 at 10:25:29PM -0400, Shaleh wrote:
>> I wrote a program that works like test for apm.  It was given to the apm maint
>> and should appear soon.  My {ana}crontab looks like this:
>> 
>> onbatt || run_heavy_job
>> 
>> or
>> 
>> onacpow && run_heavy_job
>
>        The later will crash & burn if any script uses set -e 
>        (which is usually encouraged).

No, from bash(1):

 Exit  immediately  if a simple command (see SHELL GRAMMAR above) exits
 with a  non-zero status.   The  shell  does  not exit if the command that
 fails is part of an  until  or while  loop,  part of an if statement,
 part of a && or || list,  or  if  the  command's return value is being
 inverted via !.

>        if onacpow; then run_heavy_job; fi

This is equivalent.

David


Reply to: