Scheduled restarts

Discuss magicJack running on Thin Clients

Moderators: Bill Smith, Pilot

Post Reply
johnvan
MagicJack User
Posts: 39
Joined: Sun Mar 14, 2010 9:03 am

Scheduled restarts

Post by johnvan »

I thought I'd read somewhere on here about setting up a nightly or weekly restart.
How do you do this?
Is it required, I've only been up and running for a week and no problems yet.
I thought I saw something in the BIOS but didn't look at it too much.
VaHam
Dan Should Pay Me
Posts: 851
Joined: Wed Feb 13, 2008 8:02 pm

Task Scheduler

Post by VaHam »

I just set up a task in the task scheduler (located in control panel) with the following command:

C:\Windows\system32\shutdown.exe /r /t 01 /f

and the start in: C:\Windows\system32

Then just use the task scheduler to select when the task runs.

The meaning of the / commands are as follows:

/r restart
/t 01 wait 01 seconds before performing the task after it is started
/f force the closing on any open applications
Sad Times Ahead for this Obamanation !!!! Psalms 109:8
slceso
MagicJack User
Posts: 40
Joined: Thu Feb 18, 2010 9:54 am

Post by slceso »

VaHam,

I think they are dashes, not slashes.. maybe doesn't matter:

near bottom of post
http://www.phoneservicesupport.com/tring-to-register-mj-again-after-task-reboot-what-gives-t8715.html
VaHam
Dan Should Pay Me
Posts: 851
Joined: Wed Feb 13, 2008 8:02 pm

Post by VaHam »

slceso wrote:VaHam,

I think they are dashes, not slashes.. maybe doesn't matter:

near bottom of post
http://www.phoneservicesupport.com/tring-to-register-mj-again-after-task-reboot-what-gives-t8715.html
Actually both do work!
Sad Times Ahead for this Obamanation !!!! Psalms 109:8
johnvan
MagicJack User
Posts: 39
Joined: Sun Mar 14, 2010 9:03 am

Post by johnvan »

Thanks, I got that working for restarts in the middle of the night twice a week.
One note though, task scheduler wasn't enabled to start automatically so when I tried to test the task it said that task scheduler wasn't running.
In order to get task scheduler running on startup do this:
START > My Computer (Right click and select Manage)
Double click "Services and Applications" then Double click "services"
Scroll down to Task scheduler, right click, select properties and under Startup type select Automatic.
I believe you also need to commit the changes with the green padlock at the bottom.

Thanks for the help on this guys.
VaHam
Dan Should Pay Me
Posts: 851
Joined: Wed Feb 13, 2008 8:02 pm

Post by VaHam »

johnvan wrote:Thanks, I got that working for restarts in the middle of the night twice a week.
One note though, task scheduler wasn't enabled to start automatically so when I tried to test the task it said that task scheduler wasn't running.
In order to get task scheduler running on startup do this:
START > My Computer (Right click and select Manage)
Double click "Services and Applications" then Double click "services"
Scroll down to Task scheduler, right click, select properties and under Startup type select Automatic.
I believe you also need to commit the changes with the green padlock at the bottom.

Thanks for the help on this guys.
Your right about task scheduler service not being set to start automatically by default and I for some reason always forget to tell folks about that. Glad you got it figured out and running!
Sad Times Ahead for this Obamanation !!!! Psalms 109:8
kulumbaa
MagicJack Contributor
Posts: 57
Joined: Sat Apr 26, 2008 3:18 am

Post by kulumbaa »

1 TC up 78 days and humming strong. and another up 55 days and strong. no reboots needed here
Tribute3
magicJack Apprentice
Posts: 16
Joined: Sun Apr 11, 2010 8:53 pm

Re: Task Scheduler

Post by Tribute3 »

VaHam wrote:I just set up a task in the task scheduler (located in control panel) with the following command:

C:\Windows\system32\shutdown.exe /r /t 01 /f

and the start in: C:\Windows\system32

Then just use the task scheduler to select when the task runs.

The meaning of the / commands are as follows:

/r restart
/t 01 wait 01 seconds before performing the task after it is started
/f force the closing on any open applications
How do you add this command to task scheduler? Its not in the list and doesnt provide an option to run commands, at least i dont see it. Did u put it in a notepad file, and run from C:\Windows\system32?

Sorry for the trouble and thanks for a great idea.
johnvan
MagicJack User
Posts: 39
Joined: Sun Mar 14, 2010 9:03 am

Post by johnvan »

Just navigate to the shutdown .exe when your'e in the task manager setup wizard select it and type the rest in.
Tribute3
magicJack Apprentice
Posts: 16
Joined: Sun Apr 11, 2010 8:53 pm

Post by Tribute3 »

nevermind, i figured it out :)

Now its bullet proof :)
Tribute3
magicJack Apprentice
Posts: 16
Joined: Sun Apr 11, 2010 8:53 pm

Post by Tribute3 »

Didnt notice you posted johnvan, thank you
VaHam
Dan Should Pay Me
Posts: 851
Joined: Wed Feb 13, 2008 8:02 pm

Re: Task Scheduler

Post by VaHam »

Tribute3 wrote:
VaHam wrote:I just set up a task in the task scheduler (located in control panel) with the following command:

C:\Windows\system32\shutdown.exe /r /t 01 /f

and the start in: C:\Windows\system32

Then just use the task scheduler to select when the task runs.

The meaning of the / commands are as follows:

/r restart
/t 01 wait 01 seconds before performing the task after it is started
/f force the closing on any open applications
How do you add this command to task scheduler? Its not in the list and doesnt provide an option to run commands, at least i dont see it. Did u put it in a notepad file, and run from C:\Windows\system32?

Sorry for the trouble and thanks for a great idea.
Click the BROWSE button under the list and navigate to C:\Windows\system32\shutdown.exe select it then add the commands afterward.
Sad Times Ahead for this Obamanation !!!! Psalms 109:8
Tribute3
magicJack Apprentice
Posts: 16
Joined: Sun Apr 11, 2010 8:53 pm

Post by Tribute3 »

have any of you guys had luck with getting the time to sync via NTP?
i get
"An error occurred while Windows was synchronizing with ANY SERVER"
servers include, ntp pool, windows, gov, and a few others.
Tribute3
magicJack Apprentice
Posts: 16
Joined: Sun Apr 11, 2010 8:53 pm

Post by Tribute3 »

Tribute3 wrote:have any of you guys had luck with getting the time to sync via NTP?
i get
"An error occurred while Windows was synchronizing with ANY SERVER"
servers include, ntp pool, windows, gov, and a few others.
If anyone is interested in keeping the scheduled restarts acurate using a NTP, you will need the following hotfix for the June 2007 image for a hp t5710. It repaird the update feature in XPe. :)

December 2007 Cumulative Time Zone Update for Microsoft Windows Operating Systems

ftp://ftp.hp.com/pub/softpaq/sp38001-38500/sp38172.exe
gpsuf
MagicJack Newbie
Posts: 3
Joined: Wed Mar 11, 2009 4:45 pm

Post by gpsuf »

Hi,

Can somebody help to explain why we should reboot the Thin Client periodically? Is that because of possible virus, spamware or MJ memory leaks?

I do not see any 'commit' command in the reboot script so I guess that there is nothing from the current run to be be saved before reboot, e.g. MJ update.

Just assume that there are no viruses and my TC could run for a while (I have a T5720 (512/512)), do I need to reboot periodically?
Diggs
Dan isn't smart enough to hire me
Posts: 268
Joined: Fri May 14, 2010 2:57 pm

Post by Diggs »

gpsuf wrote:Hi,

Can somebody help to explain why we should reboot the Thin Client periodically?
Some software and processes have a memory leak that continues to use more memory as time goes on. Windows XPe in itself is very stable but there may be circumstances that cause it to slowly consume more memory as time goes on. You can use Task Manager to check (Ctl-Alt-Del) memory usuage after a week/month and see how your system does. Mine reboots every month and seems to leak about 15-25 MB during that time.
murugan
magicJack Apprentice
Posts: 26
Joined: Thu May 26, 2011 7:27 pm

Post by murugan »

johnvan wrote:Thanks, I got that working for restarts in the middle of the night twice a week.
One note though, task scheduler wasn't enabled to start automatically so when I tried to test the task it said that task scheduler wasn't running.
In order to get task scheduler running on startup do this:
START > My Computer (Right click and select Manage)
Double click "Services and Applications" then Double click "services"
Scroll down to Task scheduler, right click, select properties and under Startup type select Automatic.
I believe you also need to commit the changes with the green padlock at the bottom.

Thanks for the help on this guys.
Some notes:
01 - You can also start the Task Scheduler from Control Panel -> Admin Tools -> Services -> Task Scheduler
Edit: added 01a - You could also start the Task Scheduler from the cmd prompt: Start -> Run -> control schedtasks
02 - Whichever way you get to Task Scheduler, right clicking it (Properties) and changing the "Run" state to "Automatic" may sometimes fail as the task scheduler has dependencies.
03 - If the Task Scheduler fails to "Start", check its dependencies - click on the Dependencies tab on the top. Task scheduler depends on RPC (sub set DCOM) and Event log (really not necessary) but add them if you want task scheduler to work.
04 - Use PowerOff.exe - a free, slim, far more useful and sophisticated program (can also be made to run as a service) Why run as a service? Because Windows loads all services first. Thanks for the program Jorgen Bosman. PowerOff is a misnomer - it can also reboot, etc.
See http://users.telenet.be/jbosman/poweroff/poweroff.htm

Please remember to "Commit" all changes to EWF after you are done.
Last edited by murugan on Wed Aug 22, 2012 10:47 am, edited 1 time in total.
murugan
magicJack Apprentice
Posts: 26
Joined: Thu May 26, 2011 7:27 pm

Re: Task Scheduler

Post by murugan »

VaHam wrote:I just set up a task in the task scheduler (located in control panel) with the following command:

C:\Windows\system32\shutdown.exe /r /t 01 /f

and the start in: C:\Windows\system32

Then just use the task scheduler to select when the task runs.

The meaning of the / commands are as follows:

/r restart
/t 01 wait 01 seconds before performing the task after it is started
/f force the closing on any open applications
If you are running Service Pack 1, then you don't have a way to add the extra switches to the shutdown.exe command - viz: -r -t 10 -c "comment - max 127 chars".
A work around is to create a shutdown.bat with a simple line with shutdown.exe -r -t 10 -f -c "MJ is rebooting". Point to the shutdown.bat when you are creating a scheduled task.

You could also use PowerOff.exe - a free, slim, far more useful and sophisticated program (can also be made to run as a service) Why run as a service? Because Windows loads all services first. Thanks for the program Jorgen Bosman. PowerOff is a misnomer - it can also reboot, etc.
See http://users.telenet.be/jbosman/poweroff/poweroff.htm

Please remember to "Commit" all changes to EWF after you are done.
Post Reply