Automatic shutdown Ubuntu

December 2016


Automatic shutdown Ubuntu




Issue


Having a pc with Ubuntu with file sharing NTFS on it I wish that every day the PC stops at a certain time without any intervention on my part. Can anybody help me please?

Solution


To do this you must use the CRON command that manages the tasks, so with the graphical interface that is gcrontab, which is in the Ubuntu repositories:

sudo apt-get install gcrontab

or run without a GUI:

sudo cron-e: to edit a configuration file CRON

Then you choose the default editor (VIM for Me), and finally you will return to a line in the file containing information separated by a space or a tab:

The_minutes the_hours (over 24) the_date_the_month the_week command_to_execute

Example: 5 15 * * * shutdown-h now means extinction of the computer at 15:05 every day, every month

Note


Solved by G_rico

Related :

This document entitled « Automatic shutdown Ubuntu » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.