PDA

View Full Version : Computer Help: Scheduled Tasks



Magnor Criol
2008-02-27, 12:43 AM
Please excuse my florid speech; it's a mannerism I can't seem to drop whilst typing on forums. If you want to skip straight to the problem, look for the bolded words down below.

I searched around a bit, and couldn't find a specific "Computer Help" thread; a number of individual threads (like this one is about to become) but no large thread for anyone to post in. If such a thread exists and I somehow missed it, direct me thataways and I'll head over there posthaste! Assuming my question hasn't been answered already. =p

Anyhow.

I'm not all that familiar with many of the machinations of Windows. Thanks to some friends and roommates I know often what it's capable of, but not how to get there. I know, for example, that you can use Scheduled Tasks to do things like bring up messages at a specific time, play music at a certain point, or shut down your computer at a preordained moment. Unfortunately, as much as I'd like to do these things - I need something to help me curb my late-night (...early-morning...) computer habits - I can't get it to work.

What I'd like is to use Scheduled Tasks to A) pop up some message, perhaps a simple Word Document, reminding me to sleep and informing me that in a number of minutes (say, 10) my computer will shut down or hibernate, and B) for the computer to shut down or hibernate that number of minutes after that.

This doesn't seem like it'd be difficult - I thought I had it figured out, and there's even a Scheduled Task wizard to help you. My Scheduled Tasks program, however, had other plans.

When I go through the scheduled task wizard, I hit a roadblock at the pane that demands I enter the name and password of a user. User name is automatically supplied for me, but the password fields are blank, and blank they must remain, as I have no password for this account - it's the only one on this computer, and I've never bothered creating one.

If I create the task without a password, which the wizard lets me do, it simply doesn't run the program, no explanation as to why not. If I try to fabricate a password, it gives me this error message when I hit the final 'Okay' button in the wizard to create the task:

The new task has been created, but may not run because the account information could not be set.
The specific error is:
0x80070005: Access is denied.
Try using the Task page Browse button to locate the application.

So, I'm stuck. Either I don't enter the password that doesn't exist, and the task doesn't run, or I make up a password, and it still doesn't run, but apparently for different reasons.

Additionally, I'm not sure how to tell it to shut down at a specific time; in the wizard, it provides a long list of applications for me to choose from, and a browse button to search further, but I don't know which of these will net me the desired result of hibernation on a regular basis.

Any ideas?

Lorn
2008-02-27, 02:15 AM
No IDEA about Scheduled Tasks - though I be watching replies :p

But to shutdown, simply tell it to open one of the following:

New shortcut, with the destination shutdown -s -t 0 (change the 0 to the number of seconds)

.Bat file containing the above shortcut destination.

I have a desktop shortcut to shut my computer down, it works fine. However - if there are Windows updates to install it will NOT install these.


(You may notice, in system32 there's a file called shutdown.exe. Don't bother with it - the example I used above is using it, it's just a text-interface program.)

Zeb The Troll
2008-02-27, 03:15 AM
Here is a link to the Microsoft page describing how to do this via the command line...

http://support.microsoft.com/kb/317371/en-us

... but I think what you're looking for will look something like this...

at 22:00 shutdown /l /t:600 /every:M,T,W,Th,F,S,Su "Your computer will shut down in ten minutes. Go to bed."

A breakdown...
at schedules a command
22:00 is the 24-hour time when you want the command to happen
shutdown is the command, it's pretty self explanantory what this does
/l says that you're doing this to the local computer
/t:600 is the number of seconds to wait before the command is applied
/every: dictates how often the command will happen
"msg" will display what's between the quotes in a pop up message at the time indicated earlier

This command will create a scheduled task that will happen every night (as formatted). You only have to type it once at a command prompt, not run it every day or anything.

That site gives other switches and options that I'm sure you can figure out (for example, you can make one "at command" that works on weekdays at a certain time and another that works on weekends at a different time") and I'd be happy to clarify any of those potential options if you'd like.

The "at" command is actually a pretty useful tool in the right hands. I hope this proves useful to you.

Groundhog
2008-02-27, 09:27 AM
Ok, this seems a bit roundabout, but I think this may work:

1. Go to the Control Panel
2. Click on "User Accounts"
3. Click on "User Accounts" on the new page that comes up
4. Click on "Create a Password"
5. Follow the instructions on the screen that comes up, and then click OK
6. Try the Task Scheduler again with your newly created password.

Supagoof
2008-02-28, 02:20 PM
Oh, Zeb, you just opened a world of possibilities for my job. THANK YOU!

I knew I could use batch commands to do stuff, but never knew the format/never bothered to look it up. That helps immensely!

Magnor - Even with Zeb's suggestion, I'd still suggest adding a password to your PC as groundhog suggested. Why? The "in case" factor. Like, In case your PC is (god forbid) stolen. now, whoever stole it has a perfectly functioning PC with all your information on it. Don't make it easy on them! Granted, any hacker thied could probably bypass a password in a few second, there no reason to let any non-hacker thief have access to your stuff.

My brother had his stolen, and sure enough he didn't have a password on it. They ran his turbotax program, had all his info, and proceeded to open accounts/run up charges/do all sorts of things that were just a pain in the arse clean up.

Anyway, my two cents. :smallsmile:

Zeb The Troll
2008-02-29, 02:39 AM
Glad I could help, Goof. :smallcool:

Also, I totally agree that a password is a good idea even if you're the only one who uses your computer.

You should also remove your hard drive from any computer you sell. You'd be amazed what people can find on a used hard drive, even if you tooks steps to erase it all. There are people who have the skills and the tools that go around buying up used computers and then getting account numbers, passwords, et cetera, off of hard drives, even after the seller had deleted everything and then formatted it.