[OpenIndiana-discuss] crontab error

Kevin J. Woolley kjw at javabunny.net
Wed Jan 26 21:42:54 UTC 2011


On Wednesday, 26 January, 2011 13:31, "ann kok" <oiyankok at yahoo.ca> said:

> Hi
> 
> I am trying "crontab cron1.txt" and have error as
> 
> root at opensolaris:~/ann# crontab cron1.txt
> 0 0 * * 7 /root/ann/deletelog.sh >/dev/null 2>&1
> crontab: error on previous line; number out of bounds.
> crontab: errors detected in input, no crontab file generated.
> 
> but it is fine in linux. What am I wrong?
> 
> cron1.txt
> * * * * * /root/ann/1.sh >/dev/null 2>&1
> * * * * * /root/ann/2.sh >/dev/null 2>&1
> * * * * * /root/ann/3.sh >/dev/null 2>&1
> 59 23 * * * /root/ann/backup.sh  >/dev/null 2>&1
> 0 0 * * 7 /root/ann/deletelog.sh >/dev/null 2>&1

From crontab(5) on a Linux box:

              day of week    0-7 (0 or 7 is Sun, or use names)

Zero is the only valid value for Sunday on Solaris, so use 0 (instead of 6, as in my last message).

Cheers,

kjw





More information about the OpenIndiana-discuss mailing list