[Ilugc] difference between interactive and background cron script

Mohan Sundaram mohan.tux at gmail.com
Thu Oct 9 20:58:04 IST 2008


On Thu, Oct 9, 2008 at 6:31 PM, Girish Venkatachalam <
girishvenkatachalam at gmail.com> wrote:
>
> cron(8) cannot use STDIO, STDOUT or STDERR. All point to /dev/null.
>
Know this and precisely the reason why piping to logfile was used.

>
> So it is AFAIK impossible to run interactive programs using cron.
>
> First check whether your script works in a batch fashion rather than
> interactive. Then you can get it working with cron.
>
> Of course you need to give full path for 'networksetup'.
>
Looks like this is the clue. Works. Thanks a ton.

Mohan


More information about the ilugc mailing list