Schedule for Server Reboot

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Schedule for Server Reboot

Postby benghoi » Mon Nov 19, 2012 11:21 am

Hi Guys,

Do you have any idea how to set a schedule that will restart the server by itself?

I found this in crontab but i know what is this mean and the format:

### Reboot nightly to manage asterisk issues and memory leaks - uncomment if issues arise
30 6 * * * /sbin/reboot

Question:
What is the meaning of 30?
meaning of 6?

Can you provide me a format for this:
I want the server will restart at 10:30pm. - sample only.

Thanks!
Vicibox5.0.3 64bit | Vicidial: 2.8-431a | Build: 140314-1134 | Asterisk: 1.8
Full Server
benghoi
 
Posts: 70
Joined: Fri Dec 09, 2011 4:56 pm

Re: Schedule for Server Reboot

Postby GaD » Mon Nov 19, 2012 1:06 pm

Here's a link to my good 'ole friends of Cyberciti:

http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/

Code: Select all
* * * * * command to be executed
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)
GaD
 
Posts: 195
Joined: Fri Jul 08, 2011 3:56 pm

Re: Schedule for Server Reboot

Postby williamconley » Mon Nov 19, 2012 1:29 pm

30 22 * * * /sbin/reboot

this will reboot at 10:30PM (2200 hrs, 30 minutes)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20276
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Schedule for Server Reboot

Postby benghoi » Tue Nov 20, 2012 2:09 pm

Thanks guys, its working.
Vicibox5.0.3 64bit | Vicidial: 2.8-431a | Build: 140314-1134 | Asterisk: 1.8
Full Server
benghoi
 
Posts: 70
Joined: Fri Dec 09, 2011 4:56 pm

Re: Schedule for Server Reboot

Postby spacejanitor » Wed Nov 21, 2012 5:28 pm

One note from me - if running a cluster, I have all the servers set to the same reboot time (in my case, 3:00AM), but I have the DB server set to reboot 5 minutes prior to the other machines so that when they are back online, the DB is already ready to roll and there are no "surprises".
http://www.MarketResearchTechnology.com
We are the leading users of ViciDial, LimeSurvey and Drupal in the market research industry. We're also a lead provider- contact us.

Cluster Installation, ViciBox Server
VERSION: 2.6-372a
BUILD: 120713-2123
spacejanitor
 
Posts: 178
Joined: Tue Feb 08, 2011 3:31 pm

Re: Schedule for Server Reboot

Postby benghoi » Wed Nov 21, 2012 5:35 pm

Thanks Spacejanitor for the note. I also did the same way. I let my DB reboot 20mins before my asterisk will reboot. But one of my problem is, after reboot the servers, are they automatically Sync to each other? because we encountered in the middle of operation, there is a message will pop up: Synchronization Error. And if this happen, the recordings will mess up.
Vicibox5.0.3 64bit | Vicidial: 2.8-431a | Build: 140314-1134 | Asterisk: 1.8
Full Server
benghoi
 
Posts: 70
Joined: Fri Dec 09, 2011 4:56 pm

Re: Schedule for Server Reboot

Postby spacejanitor » Wed Nov 21, 2012 5:41 pm

benghoi wrote:Thanks Spacejanitor for the note. I also did the same way. I let my DB reboot 20mins before my asterisk will reboot. But one of my problem is, after reboot the servers, are they automatically Sync to each other? because we encountered in the middle of operation, there is a message will pop up: Synchronization Error. And if this happen, the recordings will mess up.


Do you mean sync their NTP? If so, what I have is one server (in my case the DB) which syncs with a government NTP server, and then the remaining servers have their NTP server setting set to the DB server. So the DB acts as a sort of master NTP and the remaining servers are slaves to it.

However, if you are getting time sync errors it isn't necessarily because of this. I've had time sync errors occur from all kinds of things, such as network bottlenecks/latency and even a sluggish or full HDD on one of the telephony servers.
http://www.MarketResearchTechnology.com
We are the leading users of ViciDial, LimeSurvey and Drupal in the market research industry. We're also a lead provider- contact us.

Cluster Installation, ViciBox Server
VERSION: 2.6-372a
BUILD: 120713-2123
spacejanitor
 
Posts: 178
Joined: Tue Feb 08, 2011 3:31 pm

Re: Schedule for Server Reboot

Postby benghoi » Wed Nov 21, 2012 6:35 pm

i also have the same setup for the NTP. My DB is the NTP server then the rest servers are sync to DB. All of my server has 500GB but the recordings will be send to FTP Server
Vicibox5.0.3 64bit | Vicidial: 2.8-431a | Build: 140314-1134 | Asterisk: 1.8
Full Server
benghoi
 
Posts: 70
Joined: Fri Dec 09, 2011 4:56 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 49 guests