Skip to main content
added 646 characters in body
Source Link
Tillman32
  • 1k
  • 8
  • 12

You can verify jobs that are running in the background by using the command:

jobs

Like this:

root@server1:/var/www/nodebb# jobs [1]+ Running shutdown -r 17:00 &

Here is a good resource on learning how to use jobs, and manage background jobs in general: http://www.cyberciti.biz/faq/linux-command-line-run-in-background/

Keep in mind that the job is tied to your session, if you close it ( AKA close the shell ) your job wont run. A better option for me would be to use cron to schedule the reboot.

Edit your crontab:

crontab -e

Now enter the cron entry... this will reboot the box every day at 5pm. (17:00)

*   17  *   *   *   shutdown

Thats it for cron! You can view your crontab via:

crontab -l

You can verify jobs that are running in the background by using the command:

jobs

Like this:

root@server1:/var/www/nodebb# jobs [1]+ Running shutdown -r 17:00 &

You can verify jobs that are running in the background by using the command:

jobs

Like this:

root@server1:/var/www/nodebb# jobs [1]+ Running shutdown -r 17:00 &

Here is a good resource on learning how to use jobs, and manage background jobs in general: http://www.cyberciti.biz/faq/linux-command-line-run-in-background/

Keep in mind that the job is tied to your session, if you close it ( AKA close the shell ) your job wont run. A better option for me would be to use cron to schedule the reboot.

Edit your crontab:

crontab -e

Now enter the cron entry... this will reboot the box every day at 5pm. (17:00)

*   17  *   *   *   shutdown

Thats it for cron! You can view your crontab via:

crontab -l
Source Link
Tillman32
  • 1k
  • 8
  • 12

You can verify jobs that are running in the background by using the command:

jobs

Like this:

root@server1:/var/www/nodebb# jobs [1]+ Running shutdown -r 17:00 &