Schedule a Windows XP machine to Reboot every day and also to print a certain file at a certain time each day

Hi Folks,

I need you help and advice.

I have a machine that i need to reboot (Windows XP) at midnight every night how can i schedule this task.

I also need to send a file to the printer at a certain time each day from the same machine.

Thank you in advance for your help.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Click Start, Run and type control schedtasks
Double-click Add Scheduled Task. The Scheduled Task Wizard starts.
Click Next.
Under Click the program you want Windows to run, click Browse.
In the Select Program to Schedule dialog box, locate the %SystemRoot%\System32 folder, locate and click the Shutdown.exe file, and then click Open.
Under Perform this task, specify a name for the task and how frequently you want this task to run, and then click Next.
Under Select the time and day you want this task to start, specify a start time and date for the task, and then click Next.
Type the user name and password to run this task under, and then click Next.
Click to select the Open advanced properties for this task when I click Finish check box, and then click Finish.
Click the Task tab. In the Run box, specify any additional parameters that you want to use with Shutdown.exe. Click OK.
Important: In the 10th step, you need to add the parameters for the Shutdown.exe command. To immediately shutdown the system (0 second timeout), the command-line would be:

shutdown.exe -s -t 00

To reboot the system immediately, this command:

shutdown.exe -r -t 00

For additional help, type Shutdown /? at the Command Prompt. Scheduling the Shutdown.exe without any parameters will not help. It will just execute with a exit code 0 (success)
I'd follow the above, but would create a batch file running the shutdown -r cmd, this would then be selected when setting up the scheduled task.  You can do the same with the print cmd -specify the file you want to print and enter the syntax into a batch file and schedule the task above.

To create a batch file= open note pad > enter syntax = shutdown -r > save as > "C:\shutdown.bat".  The C represents your drive letter, so change accordingly.  Ensure to put in the speech marks as otherwise it will save as a .txt file.  
For the print command follow the same procedure, but in the text file enter
                      Print /D:[device name] drive:path and filename

A faster alternative is to go the command prompt and type
C:\shutdown -t xx
where xx is how long you want the PC to stay before shutting down (xx is in seonds)



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Just to confirm a point - the shutdown command shutdown -r has a shutdown warning period of 30secs by default.  Applying the shutdown -t xx command is only necessary if you require an alternative to that default time.  As I understand the question you want to run schedules for when you are not there, therefore the -t command is not essential.

ANGELA11Author Commented:
Hi All,

thank you for you help it has been really great.
I just can't seem to get the print batch file working.
I created the batchfile with the commands Print /D:[device name] drive:path and filename
However it just won't run for me.

Any help would be great that you can give me.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.