#1  
Old 22nd November 2006, 13:06
statiic statiic is offline
Senior Member
 
Join Date: Oct 2006
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cron daily automated booth

I tryed to setup an cron.daily for an automated reboot of my server.

I want it to reboot every day at 05:00 AM local time.

Does anyone know whats the proper script for this?

Or should I do it only once a week?
Reply With Quote
Sponsored Links
  #2  
Old 23rd November 2006, 17:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Have a look here: http://www.howtoforge.com/forums/sho...=shutdown+cron
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 23rd November 2006, 18:25
statiic statiic is offline
Senior Member
 
Join Date: Oct 2006
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes I know that part. But i'm using mandriva an have to create an file within the cron.daily folder. But what must be in the file.

So the cron is already running daily, but now I want to specifiy the time or am I incorrect here?
Reply With Quote
  #4  
Old 23rd November 2006, 23:01
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,149
Thanks: 4
Thanked 56 Times in 52 Posts
Default

I setup root crons as followed:

1) make a file in /root named cron.txt
2) add stuff there
Code:
0 5 * * * reboot
3) save the file
4) add it to as cron:
Code:
crontab cron.txt
5) check whether it's added
Code:
crontab -l
Reply With Quote
  #5  
Old 24th November 2006, 17:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Quote:
Originally Posted by statiic
Yes I know that part. But i'm using mandriva an have to create an file within the cron.daily folder. But what must be in the file.

So the cron is already running daily, but now I want to specifiy the time or am I incorrect here?
You could create a file /etc/cron.daily/reboot which looks like this:
Code:
#/bin/bash
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin

shutdown -r now
exit 0
Don't forget to make it executable:
Code:
chmod 755 /etc/cron.daily/reboot
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig cron jobs mphayesuk General 3 30th August 2009 12:15
Automated installer for Dapper danf.1979 Developers' Forum 1 6th August 2006 13:34
Cron Jobs and root emails Jcorrea920 General 1 26th April 2006 20:53
How to disable the shell cron jobs? raymov General 3 1st November 2005 05:43
DNS client update IP thru cron or other? domino Server Operation 5 18th August 2005 06:16


All times are GMT +2. The time now is 06:31.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.