Crond is stubborn...
Hello all,
Ever since installing crond I have had the problem that unless I restart it manually as root, it is not cronding anything :(. After killing and starting it manually everything works though... Had to restart the other day and well... it's pretty annoying when your alarm doesn't go off anymore (yup Slackware has 1001 uses :D).. I restart crond exactly the same way as it appears in ps. Anyone got any clue as to the cause of this problem? Thanks :) |
How do you add a cron for your user ?
|
Same symptoms here
I have three perfectly working slack servers, save for this exact same problem.
Crond runs at startup, it even writes to the log saying it did the run-parts hourly. Problem is, the scripts in cron.hourly were not run. There's no problem with the scripts, if I run them manually they work. Kill crond and restart as root and it runs perfectly forever (well, 60 days uptime last count). I tried the kill cron/restart trick in rc.local, but that doesn't work either. Still debugging this one! |
@ all:
Sorry I ended up with my school taking all my time and some personal issues. That and my holidays prevented my from getting back to this after all this time. My apologies :) @ keefaz: user@box $ crontab -e and root@box $ crontab -e user have both been tried. None of them work until I manually restart crond. @ bender647: Have you managed to find a solution yet? I myself am still stumped.. |
I find it curious, I ran slackware 9.1, now 10.0 and has never problem with cron. I add cron for user like you (crontab -e).
could you post your crontab -l for this user ? |
Well I tried it with a few users, but my original testcase is following:
Code:
coresausage ~ # crontab -l stereo |
Maybe a tip (or not)
As you indicated the days in plain text, it may be a problem with your locale ? Did you try 1-6 instead of mon-fri ? Also from man 5 crontab, it say that name interval does not work, it should be number so : 1-6 |
Thanks, I'll try it now :)
And even though I am dutch, I prefer english anyway :) So probably not a locale problem.. |
hem, I did a mistake for monday to friday, it should be 1-5 ;)
|
I noticed lol... but doesn't matter :).
After my last post, I have edited my crontab for this user to look like this: Code:
coresausage worstje # crontab -l stereo |
0 * * * * : means 13:00 - 14:00 - 15:00 ...
you want to test cron ? try this : on a terminal type : tty say current tty is /dev/pts/135 crontab -e * * * * * date > /dev/pts/135 save and look at your terminal |
Hmm weird.. I just used your tactic to test, and it seems crond is indeed doing its job like it should... But somehow, my script doesn't want to play the music, while it does when I am logged in as a certain user... Contents of easyplay script are following:
Code:
#!/bin/sh EDIT: And why does it suddenly work when I restart crond manually? I appreciate all the help.. :) |
first I would check mail to see if errors are logged :
second, I would try : Code:
*/3 * * * * /music/scripts/easyplay 100 -q '/music/force and styles - field of dreams.mp3' 1> /dev/null |
I don't have mail for root or the stereo user.
Second, your script is not working either... for as far I can tell anyway.. Running it manually in the CLI works ofcourse... For as far I know my stereo user has all the permissions to play music... I really appreciate your quick replies :) You don't see that often.. Thanks again! |
Don't have mail ? Not a problem, we can log error in file ;)
say at /home/stereo/logfile But please try to cpy the mp3 without spaces in its name as the problem may come from that. Code:
*/3 * * * * /music/scripts/easyplay 100 -q '/music/force and styles - field of dreams.mp3' >> /home/stereo/logfile 2>&1 |
All times are GMT -5. The time now is 01:36 AM. |