|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Programming & Scripting A place to discuss website design, programming, shell scripts, etc |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello everyone,
I am running openSuSE v10.2, cron-4.1-68, and an application that I use creates a user crontab file (/var/spool/cron/tabs). The problem is that the crontab is not running anymore. I added a date command piped to a file every 30 min. to see if cron is running my scripts, which it is not. I prod cron by both 'crontab -u [username] -e' adding a blank line to the top forcing a save and a 'rccron restart'. It may run for a while but then give up, or not run at all. When I add entries into the /etc/crontab file directly, there are no issues at all and everything runs smooth... but then I am constantly making manual changes to etc/crontab when my application changes its user crontab. There must be a reason for this... I can't find anything in the logs either that suggest a syntax issue or such. Any suggestions?? Thanks ever so much! -Cheers, Peter. |
|
|||
|
Remember that the syntax of user crontabs differs from root crontabs.
/etc/crontab and crontabs in /etc/cron.d look like this: 0 0 * * * root command arg1 arg2 ... User crontabs created by crontab -e look like this: 0 0 * * * command arg1 arg2 Basically users have no option to run as anybody except themselves, whereas root crontabs can switch users. |
|
|||
|
ken_yap,
Thanks for the response... Yes, that is the format that I am using. Here is my date command for checking: * * * * * date >/data/zimbra_cront.lst For instance, my date file shows that the crons last ran yesterday around 11:34pm. I did an rccron restart this morning and its running again, but I don't know when it will stop. Thanks. -Cheers, Peter. |
|
|||
|
Before you restart the cron service, check if /usr/sbin/cron is running. If it is, do a strace on the process id to see what it's doing, why it's stuck.
|
|
|||
|
Will do...
Right now its not hanging (seeing as I am watching it like a hawk)... but I will try and catch it in the act (or lack of act)... Thanks. -Cheers, Peter. |
|
|||
|
Well, it died again last night... my file contains 'Fri May 23 00:14:01 EDT 2008'
The process was dead. Again, nothing noticeable in the logs... arg. I will look to see what runs at that time. -Cheers, Peter. |
|
|||
|
Attach a strace to the running cron to see what why it dies.
|
|
|||
|
Omg... :blink:
ken_yap... Thank you ever so much and so sorry for wasting your time. I feel like hitting myself with a stupid bottle. It was my (very stupid) bad. I was digging in the wrong hole. I ran strace like you mentioned, several times I might add, because I could not figure why cron was getting a kill signal. Well, my stupidity... to work around an application bug I was restarting syslog-ng in another crontab... or so I thought. For the syslog restart line I had entered cron... so I basically had a line that killed cron. I just am in awe of this... Me thinks a vacation is in order... ohi. Thanks ever again for your help. -Cheers, Peter. |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|