Loony BoB Posted December 2, 2005 Share Posted December 2, 2005 I've recently reinstalled Windows on a new hard drive and have noticed that my Task Scheduler is no longer operating correctly. No matter how I set it up and no matter what I ask it to do - even if it's just opening Notepad - it won't run properly. What happens when the task is run is that, in Task Scheduler, it will display the word 'Running...' as normal, and if I open Task Manager the process will be there... but it's not running. I've tested everything I've run using the Start > Run command and I know that works just fine. Do you have any ideas on what might be causing this problem?Just so you know, I've tried the fix used in this thread to no avail. Link to comment Share on other sites More sharing options...
net_user Posted December 2, 2005 Share Posted December 2, 2005 is your install nlite?is the service running?does your logon account have a password?scheduled tasks need a user name with a password Link to comment Share on other sites More sharing options...
Loony BoB Posted December 8, 2005 Author Share Posted December 8, 2005 Can you let me know what you mean by 'nlite'?The service was running, the login does have a password and the password was entered as it should be into the tasks.Apologies for the late reply. Link to comment Share on other sites More sharing options...
eyeball Posted December 8, 2005 Share Posted December 8, 2005 if you right click the task and go to properties and the box that says something like "start in" and check that if your .bat file or whatever is in for example c:\windows that you start in c:\windowsthanks Link to comment Share on other sites More sharing options...
Loony BoB Posted December 8, 2005 Author Share Posted December 8, 2005 Here's the info for one of my tasks.Run: "C:\Documents and Settings\Daniel Towns\My Documents\Text files\landlord.txt"Start in: "C:\Documents and Settings\Daniel Towns\My Documents\Text files"Run as: COMPY-COMPY\Daniel TownsRun only if logged in - unchecked.Enabled - checked.Schedule: I don't think this matters much as when I do a test run of anything (by right clicking the scheduled task and then clicking 'Run') it still won't run properly.SettingsDelete the task if it is not scheduled to run again - unchecked.Stop the task if it runs for 5 minutes - checked.Idle time area - both unchecked.Power Management area - First two options checked, last option unchecked.The problem persists with these settings. Password has been checked twice. Link to comment Share on other sites More sharing options...
cluberti Posted December 8, 2005 Share Posted December 8, 2005 Are you logged in as the same user who is running the tasks, and are the tasks allowed to run interactively? Link to comment Share on other sites More sharing options...
Loony BoB Posted December 9, 2005 Author Share Posted December 9, 2005 I'm the only person who uses my PC, and am using the only user account. Link to comment Share on other sites More sharing options...
cluberti Posted December 9, 2005 Share Posted December 9, 2005 If the tasks aren't set to run interactively, you will not see them (and they may not work, if they need to interact with certain portions of the system).Try adding the task using the "at" command (at <time in 24 hour format> <path to executable> /interactive) and see if the task runs. Link to comment Share on other sites More sharing options...
Loony BoB Posted December 9, 2005 Author Share Posted December 9, 2005 The thing is, I know these tasks worked before I got the new hard drive. I can't imagine any reason why they would work then and not now, unless it's some kind of weird configuration issue that is beyond my knowledge. Also, I don't think there's any command such as that you mentioned which only activates on the first day of a month. Link to comment Share on other sites More sharing options...
cluberti Posted December 9, 2005 Share Posted December 9, 2005 No, but AT commands are good for testing if a Scheduled task is running correctly. An AT command will run as the logged-on user, if that user is logged on, and the /interactive switch ensures that it runs and can interact with winstation#0, or the console. Scheduled tasks should run like that when configured, but they don't always work properly (as you've now seen). It's at least a good test to see if the problem is with the scheduled tasks subsystem, or the OS itself. Link to comment Share on other sites More sharing options...
Loony BoB Posted December 9, 2005 Author Share Posted December 9, 2005 Ah, I see. I just ran the following using Start, 'Run':at 1115 "C:\Documents and Settings\Daniel Towns\My Documents\Text files\landlord.txt" /interactiveWhen I entered the information, an MS DOS Prompt screen flashed for a splitsecond. When the time came around, nothing happened. I hope I did it right. Link to comment Share on other sites More sharing options...
nakira Posted December 10, 2005 Share Posted December 10, 2005 Using the /integrate switch at the end causes it to be added as a parameter to the command.Try this... (change time accordingly). If you use it in a cmd window you'll see "Added a new job with job ID = X" at 11:15 /interactive /every: "C:\Documents and Settings\Daniel Towns\My Documents\Text files\landlord.txt"Or this variant, to have it run on the 1st day of the monthat 11:15 /interactive /every:1 "C:\Documents and Settings\Daniel Towns\My Documents\Text files\landlord.txt"C:\>at /?The AT command schedules commands and programs to run on a computer ata specified time and date. The Schedule service must be running to usethe AT command.AT [\\computername][ [id] [/DELETE] | /DELETE [/YES]]AT [\\computername] time [/iNTERACTIVE] [ /EVERY:date[,...] | /NEXT:date[,...]] "command"\\computername Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.id Is an identification number assigned to a scheduled command./delete Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled./yes Used with cancel all jobs command when no further confirmation is desired.time Specifies the time when command is to run./interactive Allows the job to interact with the desktop of the user who is logged on at the time the job runs./every:date[,...] Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed./next:date[,...] Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed."command" Is the Windows NT command, or batch program to be run. Link to comment Share on other sites More sharing options...
Loony BoB Posted December 10, 2005 Author Share Posted December 10, 2005 (edited) Ah, this works! Thanks very much for your help.Does anyone have any idea why this worked and Scheduled Tasks did not, despite Scheduled Tasks running before I formatted my PC?EDIT: What would I need to enter next to /every to get a task to run every day? Edited December 10, 2005 by Loony BoB Link to comment Share on other sites More sharing options...
nakira Posted December 11, 2005 Share Posted December 11, 2005 (edited) Runs the command on each specified day(s) of the week or month/every:monday means every monday ..For everyday: /every:monday,tuesday,wednesday,thursday,friday,saturday,sunday Edited December 11, 2005 by nakira Link to comment Share on other sites More sharing options...
cluberti Posted December 11, 2005 Share Posted December 11, 2005 When you run a scheduled task as a specific user (rather than the local system account), you run the risk of the application not running properly in certain situations. For instance, if the script or program needs an actual user session and desktop heap memory, it will need to run interactively - that gives it a session, with the credentials of the user, and allows it to do things on the virtual winstation that it would not otherwise be able to do. If the program or script is unable to interact with the desktop winstation of the logged on user, it will show either as failing, or continue to run in an error state (and show "running") if it does not have error handling that can error out in such a situation (scripts being the most obvious in this scenario).It is likely that you had the task set to run interactive in scheduled tasks before you formatted, and for whatever reason it isn't running interactively now. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now