Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th September 2007, 20:02
dwygant dwygant is offline
Junior Member
 
Join Date: Sep 2007
Posts: 4
Thanks: 2
Thanked 0 Times in 0 Posts
Default Thirty days uptime, then reboot every hour??

I would like to set a script in cron.monthly that will add a second script in cron.hourly after a month of uptime has passed, which will shutdown the system every hour.

In other words, unless the demo user knows the root password and is able to access the first job to delete it, the system will detect that it has been up for thirty (demo time) days and begin to shut down ever hour after that.

This should be easy for some of you. Thanks in advance too!
Reply With Quote
Sponsored Links
  #2  
Old 26th September 2007, 15:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: LŁneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
 
Default

What about putting a script in cron.hourly that checks the date and shuts down the system if the 30 days are over?
__________________
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


All times are GMT +2. The time now is 02:38.


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