1748185 Members
3891 Online
108759 Solutions
New Discussion юеВ

Re: crontab behaviour

 
Spark_2
Frequent Advisor

crontab behaviour

Hi,

cron with entry:

0 18 * * 6 sh

is being executed daily...what could be the reason please
14 REPLIES 14
Hasan  Atasoy
Honored Contributor

Re: crontab behaviour

did you edit crontab file directly. or by crontab -e ?.
try stop and start cron deamon.

Hasan
Suraj K Sankari
Honored Contributor

Re: crontab behaviour

Hi,

>>what could be the reason
You are wrong your cron entry will not run daily as per your entry it will run
0 min 18 hr. but every 6 day of week.

In crontab file there are five fields

field allowed values
----- --------------
minute 0-59
hour 0-23
day of month 1-31
month 1-12 (or names, see below)
day of week 0-7 (0 or 7 is Sun, or use names)


For more information see the below link
http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5

Suraj
Michal Kapalka (mikap)
Honored Contributor

Re: crontab behaviour

hi,

check this link :

http://en.wikipedia.org/wiki/Cron

its very good describe.

mikap
Dennis Handly
Acclaimed Contributor

Re: crontab behaviour

This should only work on Sat at 18:00.
I assume you have something other than just "sh" as the command?
Spark_2
Frequent Advisor

Re: crontab behaviour

Yes Dennis...sh has a command further...but it has been executing for last two days...
Pete Randall
Outstanding Contributor

Re: crontab behaviour

What does /var/adm/cron/log show concerning this particular job?


Pete

Pete
Spark_2
Frequent Advisor

Re: crontab behaviour

it gets executed at the mentioned everyday since 2 days...I have checked the logs well
TTr
Honored Contributor

Re: crontab behaviour

> 0 18 * * 6 sh

Where did you get this? Did you type "crontab -l"?

Run crontab -l and check if there is another cron entry for the same "sh" script.

Check what the sh script does when it runs. It could be scheduling itself to run again in 24 hours.
Spark_2
Frequent Advisor

Re: crontab behaviour

have already checked above mentioned two points...