Scheduling Windows XP Shut Down

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
rich_m

Scheduling Windows XP Shut Down

Post by rich_m »

How can I schedule Win XP to shutdown at a particular time everyday?
AR

Re:Scheduling Windows XP Shut Down

Post by AR »

You could use Scheduled Tasks (C:\Windows\Tasks) but you'll need a 3rd party program to perform the actual shutdown.
rich_m

Re:Scheduling Windows XP Shut Down

Post by rich_m »

Like what?
AR

Re:Scheduling Windows XP Shut Down

Post by AR »

Actually, Windows has a builtin program called, strangely enough, shutdown.
Just create a scheduled task that executes "shutdown -s"
rich_m

Re:Scheduling Windows XP Shut Down

Post by rich_m »

how do i do that?
I Lostalim

Re:Scheduling Windows XP Shut Down

Post by I Lostalim »

As was suggested above:

C:\Windows\Tasks

You'll find everything you need for task schedular right there. Just create a new task.

ALternatively there are also third party programs that will also do it for you, and a lot of Download Assistant programs have an option to shut down when the download is complete. Other programs also have "shutdown when finished" options.
Actually, Windows has a builtin program called, strangely enough, shutdown
So did DOS - which I thought was quite strange on our old 386, because all it did was take nothing of a second, go "BEEEP" and print a message saying something like it was safe to switch your machine off.

Of course with DOS, nobody used that because there were no background operations, so it was almost permanently safe to switch your machine off. (Remember this was back in the day when the OS couldn't interface the power supply and you had to use the button.... I feel old)
AR

Re:Scheduling Windows XP Shut Down

Post by AR »

So did DOS - which I thought was quite strange on our old 386, because all it did was take nothing of a second, go "BEEEP" and print a message saying something like it was safe to switch your machine off.
I was actually being sarcastic :), Linux has a program called shutdown as well.

Note: When you're adding the task, shutdown is in C:\Windows\System32, also be aware that the command line parameter is required but you can't specify it until after the task is created (Open its properties and change the settings there).
I Lostalim

Re:Scheduling Windows XP Shut Down

Post by I Lostalim »

So that's where it is.... not ever having had a reason to schedule a shutdown, I never really looked into the technical complications there of....
I stick with the good ol' [ALT]+[F4], then whack [Enter]
(having "grown-up" on DOS I prefer using keyboard shortcuts when roaming around Windows, it's faster for me)
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Scheduling Windows XP Shut Down

Post by Candy »

Must say, although off topic, that I consider shutting down something I do when I'm off for at least a full day. Otherwise, I don't really see any reason for shutting it down (same with heating system). Leaving the computer on saves me lots on my heating bill and costs barely anything in terms of extra electricity. Weird enough, I'm saving ?180 a month in heating bills and paying around ?72 extra in electricity. So leaving it on is ?108 cheaper for me, and I surely don't mind leaving it on :).
I Lostalim

Re:Scheduling Windows XP Shut Down

Post by I Lostalim »

I have it off overnight - mostly because of the noise factor of my poor sick machine. It's hard to sleep when your cpu fan sounds like it caught the plague. Other than that, my ISP has a 4 hour session limit, and my Inbox automatically checks itself... so if I sleep for four hours and allowing a couple hours either side of non-computing time, that would be at least three phone calls every day (nearly $0.70 Australian) That'd be a bit less than $300.00 a year on wasted phone calls. (egad I did the maths as I was typing, that's worse than I thought)

But mostly it's the noise factor.... ::)
Other than that, I frequently leave it on when I'm not using it through the day - even if I leave the house for the day - good thing we have a deal with my old man - he pays for this connection ;)
rich_m

Re:Scheduling Windows XP Shut Down

Post by rich_m »

does this command come with windows 98?
AR

Re:Scheduling Windows XP Shut Down

Post by AR »

I'm unsure but I have been unable to find a binary for it so you most likely won't be able to schedule it on 98, if you know a bit of C/C++ you should be able to write your own program, shouldn't take more than 1 or 2 lines of code.
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Scheduling Windows XP Shut Down

Post by Neo »

And what would those 1 or 2 lines have to do? :)
Only Human
AR

Re:Scheduling Windows XP Shut Down

Post by AR »

Code: Select all

#include <windows.h>

int main()
{
     ExitWindowsEx(EWX_FORCE, 0);
     return 0;
}
Only works on 98, on NT you have to accquire the permissions token first which requires a sizable code block
Poseidon

Re:Scheduling Windows XP Shut Down

Post by Poseidon »

not sure this works, but you can shut down the computer with this command:

rundll32 user,exitwindows

not sure it also works on xp.
Post Reply