LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 06-28-2017, 10:52 AM   #1
opale7000
Member
 
Registered: Jun 2017
Posts: 36

Rep: Reputation: Disabled
Unhappy Crontab and SHUTDOWN


Hello Linux fans

I wish for my desktop computer running Linux Mint 18.1 to shut down at 10:30PM every evening. I have tried several combination of commands including the following


30 22 * * * /sbin/shutdown -h now

The thing never shuts down as expected.

Last edited by opale7000; 06-28-2017 at 11:01 AM.
 
Old 06-28-2017, 12:11 PM   #2
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Shutdown command needs root privs and you made crontab entry as regular user?
 
Old 06-28-2017, 12:14 PM   #3
opale7000
Member
 
Registered: Jun 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
Update

Exactly!. I just tried it by doing

sudo crontab -e

and enter the command in there and worked as expected. It works so well that upon restart linux mint does a file system check.
Is this normal?
 
Old 06-28-2017, 12:50 PM   #4
dejank
Member
 
Registered: May 2016
Location: Belgrade, Serbia
Distribution: Debian
Posts: 229

Rep: Reputation: Disabled
Depends on a distro and on init system. In your case, it should be ok if it does not run full check. For more explanation, perhaps you would like to read this: https://askubuntu.com/questions/3831...every-bootup..
 
Old 06-28-2017, 01:33 PM   #5
opale7000
Member
 
Registered: Jun 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
Hello

I found that by removing the now shuts downs more gracefully and not presented with a file system check on restart
https://www.computerhope.com/unix/ushutdow.htm

Thanks for the tip!
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Problem with crontab:: command not executed properly via crontab Ankush Seth Linux - Newbie 11 11-11-2013 06:25 AM
[SOLVED] Can't define daily automatic shutdown with crontab kikinovak Slackware 6 10-08-2012 03:58 PM
[SOLVED] Shutdown in Crontab not executed RagingRaven Linux - Newbie 10 09-18-2011 07:26 AM
crontab shutdown not working PeteRay Linux - General 18 01-17-2010 09:16 AM
Crontab entry to shutdown if no users LostDakota Linux - Server 3 07-01-2009 09:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 09:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration