problems shutdown stopping processes from cron
by jives11 from LinuxQuestions.org on (#6P6C8)
Hi,
I have a Linux PC at home which runs boinc citizen science projects. Its running a version of Peppermint, which is based on Debian 6.1.94-1
I want to run the computer only when I have cheap rate electricity at night (00:00 - 05:00)
So I have the bios configured to boot at 00:00 and crontab to shutdown at 05:00.
I do exactly this on a second PC running a different version of debian and it works perfectly.
The problem on my peppermint computer is it doesnt shutdown from crontab
I'm editing crontab using sudo crontab -e, and if I locate the crontab file I see its the root one
My crontab has this :
Code:0 5 * * * /usr/sbin/shutdown -h now >> /var/log/shutdown.log 2>&1
50 4 * * * /etc/init.d/boinc-client stop >>/var/log/boinc-client.log 2>&1Initially I had just the first line, but noticed the machine did not shutdown
I wondered if the boinc client was hogging the cpu and somehow delaying the shutdown and causing it to timeout, so I added the second line
I later added the redirections and I get nothing in the shutdown.log file.
The boinc-client.log has the standard output from systemctl:
Code:Stopping boinc-client (via systemctl): boinc-client.service.However when I look the next day neither action has been carried out and the boinc-client is still running and the server is not shutdown
I can carry out both the boinc-client stop and shutdown from the shell via sudo correctly ?
cron is running in the background.
I'm puzzled as to why I don't appear to be able to action tasks sucessfully from it
I have a Linux PC at home which runs boinc citizen science projects. Its running a version of Peppermint, which is based on Debian 6.1.94-1
I want to run the computer only when I have cheap rate electricity at night (00:00 - 05:00)
So I have the bios configured to boot at 00:00 and crontab to shutdown at 05:00.
I do exactly this on a second PC running a different version of debian and it works perfectly.
The problem on my peppermint computer is it doesnt shutdown from crontab
I'm editing crontab using sudo crontab -e, and if I locate the crontab file I see its the root one
My crontab has this :
Code:0 5 * * * /usr/sbin/shutdown -h now >> /var/log/shutdown.log 2>&1
50 4 * * * /etc/init.d/boinc-client stop >>/var/log/boinc-client.log 2>&1Initially I had just the first line, but noticed the machine did not shutdown
I wondered if the boinc client was hogging the cpu and somehow delaying the shutdown and causing it to timeout, so I added the second line
I later added the redirections and I get nothing in the shutdown.log file.
The boinc-client.log has the standard output from systemctl:
Code:Stopping boinc-client (via systemctl): boinc-client.service.However when I look the next day neither action has been carried out and the boinc-client is still running and the server is not shutdown
I can carry out both the boinc-client stop and shutdown from the shell via sudo correctly ?
cron is running in the background.
I'm puzzled as to why I don't appear to be able to action tasks sucessfully from it