SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ).. I restart crond exactly the same way as it appears in ps.
Anyone got any clue as to the cause of this problem?
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.
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..
and next I rebooted. Ever since I have waited. Still am but I am kind of convinced that it's not going to play anymore now (13:09). And running it manually still works fine.
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
#
# Parameter 1 is volume in percent,
# parameters 2+ are given to alsaplayer.
#
# Primarily to keep crontabs clean when using them.
# Will afterwards restore master volume to what it was
# set to before starting the script.
#
OVOLUME=$(amixer sget Master | egrep -m 1 -o "\[[0-9]{1,3}%\]" | egrep -o "[0-9]{1,3}")
amixer sset Master $1% &>/dev/null
shift;
alsaplayer "$@"
amixer sset Master $OVOLUME% &>/dev/null
Is something wrong with this code? If so, why does it just work when calling it from the CLI, and not from crond?
EDIT: And why does it suddenly work when I restart crond manually?
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.