Link to home
Start Free TrialLog in
Avatar of pzozulka
pzozulka

asked on

cron job to "self restart server"

Greetings experts,

I am not familiar with Linux, and think this is a pretty easy question for someone who is familiar.

I have this cron job running: /sbin/shutdown -r now
59 23 1 * *

I get this email notification error:
shutdown: you must be root to do that!

How do I resolve this?
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pzozulka
pzozulka

ASKER

It makes sense to log in as root and do this, but I am setting up the job in PLESK. Do I have any control over any of these suggestions from PLESK?
If you have enabled root access you can login to your Plesk ControlPanel using the username root and the password you created
http://kb.mediatemple.net/questions/923/Using+root+login+with+Plesk
I only have the default ADMIN password that comes with the dedicated Virtual Machine at GoDaddy. When I use "/sbin/shutdown -r now" am I emplying to shutdown the entire server itself, maybe that is why its not allowing me to do that?

I'm trying to restart only the virtual machine that we have. I guess I don't have root password, only the Admin default login.
Isn't PLESK a virtualized host? You should be jailed inside a VM, so that you can mess around as much as you want.. or am I wrong?
It is indeed. It is a virtual control panel. Also, the owner of that cron job has full permissions setup in Plesk.
I don't understand. Within a vm you should have the freedom of rebooting it, am I wrong?
Yeah I should be. I guess I don't have the permissions to on that account. Is there a line I could insert after the CRON similar as the Windows RUN AS?