Are there software that can set time to power off?[SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
rudysuryanto

Are there software that can set time to power off?[SOLVED]

Post by rudysuryanto »

I want to turn of my computer automatically in time that I want, are the any software that run under Linux that can automatically power off computer, in time that I have set before? Thank's.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Biker
Level 5
Level 5
Posts: 517
Joined: Sat Apr 17, 2010 1:58 am
Location: Where my hat is

Re: Are there any software that can set time to power off?

Post by Biker »

No need for an app. Create a script that shuts down the computer and set it to run via Cron.
Linux User #384279
User avatar
Carl
Level 5
Level 5
Posts: 701
Joined: Wed Apr 15, 2009 5:20 pm
Location: Isle of Wight, UK

Re: Are there any software that can set time to power off?

Post by Carl »

I've used gshutdown in the past (in the repo) seemed to do the job :wink:
nono

Re: Are there any software that can set time to power off?

Post by nono »

Just a little tip.

You can set Mint to shutdown at the time you want via terminal.
First you have to have root priveleges

In terminal type:

Code: Select all

sudo su
It will ask to enter your root password

after that,

Code: Select all

shutdown -h hh:mm
hh is the hour and mm is the minutes.
Use 24-hour format (example. shutdown 13:00)
This will automatically shutdown mint at 1pm
Last edited by nono on Sun May 09, 2010 10:25 am, edited 1 time in total.
Biker
Level 5
Level 5
Posts: 517
Joined: Sat Apr 17, 2010 1:58 am
Location: Where my hat is

Re: Are there any software that can set time to power off?

Post by Biker »

Writing a simple script and running via Cron allows you to skip having to do that every time you want it to shut down at a specific time. :wink:
Linux User #384279
nono

Re: Are there any software that can set time to power off?

Post by nono »

@Biker

I don't know how to write a script so I use this.

But in the near future, I will reasearch on how to do it. Is it easy to learn?
Biker
Level 5
Level 5
Posts: 517
Joined: Sat Apr 17, 2010 1:58 am
Location: Where my hat is

Re: Are there any software that can set time to power off?

Post by Biker »

Writing a simple script is easy!

Open your favorite text editor.

Code: Select all

#!/bin/sh
/sbin/shutdown -P
Make the script executable, then set it to run at the desired time via Cron. :)
Linux User #384279
nono

Re: Are there any software that can set time to power off?

Post by nono »

Thanks for the nano tutorial Biker.
Biker
Level 5
Level 5
Posts: 517
Joined: Sat Apr 17, 2010 1:58 am
Location: Where my hat is

Re: Are there any software that can set time to power off?

Post by Biker »

Most welcome. Simple scripts are easy. Very similar to batch files you could create in DOS.
Linux User #384279
Locked

Return to “Beginner Questions”