note that if you habitually keep disks in the floppy drive or bootable CD's in the CD drive.. they will get in the way of a reboot to the hard disk.
Under OpenServer I like to add a line 'TIMEOUT=10' to help shorten the default 60 second timeout at boot time where the 'boot:' prompt waits for a keypress before auto-boot kicks in. I add this line to /etc/default/boot.
Use cron to schedule the time to reboot. 'man cron' for info, 'man crontab' for info on editing the files controlling cron.
heres a line to example rebooting every sunday night at 10:15pm:
15 22 * * 0 /etc/shutdown -g0 -y -i6
Now, I run OpenServer, so my example reflects that. -g0 means shutdown immediately, -y means answer yes to the 'shutdown now?' prompt, and -i6 means goto init level 6, which is a shutdown and reboot.
Now.. having said all that, there is really no reason you should ever need to have your SCO box doing automatic shutdowns.
I'm actually having a problem with my print scheduler. It stops running about once every two weeks for some reason. I was told that rebooting the server might aid in correcting this issue. I'm beginning to think I may have been mislead. Anyway if you know why this is happening and how to fix it, I would appreciate any insight you could give me. Thanks
Rather than reboot, it might be better to have a cronjob to check the status of the print scheduler on a regular basis and restart it if it's stopped. Something like:
ps -ef | grep lpsched
if [ $? = 1 ]
then
/usr/lib/lpsched
fi
might do the trick. Long term, however, it would be better to find the root cause of the problem. Cheers.
Jim, you can put the script anywhere as long as you reference it correctly in your cron job and make sure that it's executable using chmod. If you need help with that, post back. Cheers.
You shouldn't need to change the script at all. You chmod the script to make it executable, so:
cd /usr/lib/cron
chmod 755 startprint
Should do the trick for you. Do you need help with the cron entry - if so, bear in mind that this is a UK bank holiday and get back to me soon! Regards.
No. Issue the chmod from the command line in the directory the file is in, that will make the file executable. You'll then need to add a cron entry (using crontab -e) something like:
30 * * * * /usr/lib/cron/startprint
so that the script runs on the half hour of every hour on every day. HTH.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.