Task Scheduler not running task
I'm running in to an issue with task scheduler not running an assigned task. Short story, I'm trying to get the scheduler to display a message so many minutes before running another task (shutting down the computer). While the shutdown task works correctly, the message task does not. The history log for the task shows it having completed correctly. Long story. I work in a city college computer lab with around 150 computers. I'd really like to be able to shut them all down at a specified time without having to manually hit the off button 150 times. I've managed to get the shutdown task to work (thanks to forum members). I'd like to make sure to display a message about the system shutting down well before the event so that students and teachers have warning to save their work. Granted the shutdown time is for after class is over but better safe than sorry. Yes the shutdown task does create a warning dialog but it pops up less than a minute before it shuts down. I set the message task up the same way I set up the shutdown task. Below is how I set it up. Any help would be appreciated. 1. Open Task Scheduler 2. Click on “Create Task” a. General Tab i. Name the task ii. Click on "run whether user is logged on or not". iii. Click on “Run with highest privileges”. b. Trigger Tab i. Fill in schedule. Weekly at a specific day and time in this case ii. Under advanced settings, leave everything unchecked except “Enabled” c. Actions Tab i. Action: Display a message ii. Fill in Message Title and content d. Conditions Tab i. Everything unchecked except “Wake the computer to run this task” e. Settings Tab i. Checked “Allow task to run on demand” ii. Checked “If the running task does not stop when requested, force it to stop” 3. Put in admin password for the system 4. Wait, and nothing happens Thanks
July 21st, 2010 12:22am

Arie, How are you building the shutdown command? If you want the shutdown to happen after a greater lenght of time, just use the /t switch and specify the desired amount of time. Example: shutdown.exe /s /t 600 /c "The computer will shutdown in 10 minutes. Please save your work!" The above command will shut the computer down in 10 minutes and force any applications closed. A message will also be displayed with the text listed between the quotes. From the help on the switches: /s Shutdown the computer. /t xxx Set the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the timeout period is greater than 0, the /f parameter is implied. /c "comment" Comment on the reason for the restart or shutdown. Maximum of 512 characters allowed. /f Force running applications to close without forewarning users. The /f parameter is implied when a value greater than 0 is specified for the /t parameter. -Nagorg
Free Windows Admin Tool Kit Click here and download it now
July 21st, 2010 6:21am

Nagorg. That actualy works quiet well. The issue is I'm trying to get Task Scheduler to send out a couple of messages. Basically I'm trying to cover my butt so that no one can say they weren't warned. The switch commands for shutdown works well, but I'm trying to get Task Scheduler to send out a message as its action. Which, unless I'm misunderstanding its function, Task Scheduler should be able to do.
July 22nd, 2010 2:54am

Arie, Task Scheduler can do this. If I understand your objective correctly, it sounds like you could use multiple tasks for this. 1) Create 1 task where it's only action is to display a message warning of the upcoming shutdown. Let's say the actual shutdown would be in 20 minutes. 2) Then, create a second task that would trigger 10 minutes after the first one that only displays the warning. This second task would run the shutdown.exe command that displays its own message warning of the actual shutdown in 10 minutes. The net effect would be two different warnings spaced at 10 minute intervals with the shutdown event happening 20 minutes after the first warning. Would this achieve what you are trying to do?
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2010 2:12pm

Nagorg, that's actually exactly what I'm trying to do. The problem is when I create an task who's only action is to display a message, the message never appears. The history shows it did run but it never visibly runs. That's the essence of my problem.
July 29th, 2010 1:33am

Arie, Please do this to verify the settings for your task. 1) Export the task to an XML file. (Right click the task>Export..>Save as YourTaskName.xml) 2) Open the saved XML file in notepad to review the contents. 3) Look for the Actions element in the file, most likley this will be near the bottom. You should see something similar to the following text. Of course it should reflect the message you intend to display. <Actions Context="Author"> <ShowMessage> <Title>***WARNING***</Title> <Body>The computer will shutdown in 20 minutes!</Body> </ShowMessage> </Actions> Do you see this for your task? Have you tested your task on more than one machine? Have you tried deleting and re-creating the task? You could also enable the Task Scheduler Operational logging in Event Viewer. If there is a problem running this part of the task, perhaps this log will give a clue that will help resolve the problem. This should work for you, I have tested it myself with no problem. If it appears that everything is properly configured but the Display Message action doesnt work, you might consider opening a case with Microsoft for help with troubleshooting this issue. -Nagorg
Free Windows Admin Tool Kit Click here and download it now
July 30th, 2010 1:57pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics