Re: How to start program in cron script?
According to Carey Evans <c.evans@clear.net.nz>:
>
> To fix this, you need to stop "myprogram" from sending any output to cron.
Oh, of course! I am so stupid.
> My recommendation would be:
>
> 0 8 * * * /usr/local/bin/myprogram >/dev/null 2>&1 &
Yes, that was it. Now it works. Thanks a mill!
> 0 8 * * * /usr/local/bin/myprogram 2>&1 | /usr/bin/logger -i -t myprogram
> >/dev/null 2>&1 &
That's a nice alternative, but I found that logger doesn't quit after
myprogram is done. What am I overlooking now?
Thanks again!
Andy.
--
Andy Spiegl, University of Technology, Muenchen, Germany
E-Mail: Andy@spiegl.de URL: http://www.spiegl.de
Finger pgp.andy@spiegl.de for my PGP key
o _ _ _
--------- __o __o /\_ _ \\o (_)\__/o (_)
------- _`\<,_ _`\<,_ _>(_) (_)/<_ \_| \ _|/' \/
------ (_)/ (_) (_)/ (_) (_) (_) (_) (_)' _\o_
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reply to: