-1

I have a VPS with debian 64bit. And I would like to set a daily reboot at 7:00

with $ ps aux

root 1844 0.0 0.1 18832 964 ? Ss 07:23 0:00 /usr/sbin/cron

so the cron it's running.

When I logme in to the VPS through sftp, I can see the crontab file in /etc/crontab/.

I edit that crontab file and in the bottom I have introduce

0 7 * * * reboot

save and exit and reboot (to assume the cron) but don't did nothing

than I tried another those command lines and did nothing

0 7 * * * initd 6

0 7 * * * shutdown -r now

please help me to see what I'm missing or what I have to check step by step :(

2
  • 1
    Why? This is a very bad idea. If you are having performance issues, fix those instead of covering over the problem with a reboot. – EEAA Dec 23 '13 at 13:26
  • I just want to found out what it's missing to have cron up and running, cause as soon I figured out what's missing I will put cron doing this instead daily will be monthly. – plopes Dec 23 '13 at 14:37
0

/etc/crontab requires a user argument. So it should be something like this:

0 7 * * *   root    /usr/sbin/shutdown -r now
1
  • 0 7 * * * root /usr/sbin/shutdown -r now #didn't work... but I have looked in /usr/sbin/ and I didn't saw no shudtdown file. – plopes Dec 23 '13 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.