Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduled task not running

Status
Not open for further replies.

miraclemaker

Programmer
Oct 16, 2002
127
GB
I've created our scheduled task on our webserver. it's enabled and configured to run every ten minutes using the credientials of a user I've created in the administrators group. The problem I'm having is that it's not running.

When the task is selected, the details in the left-hand bar say when the task is next scheduled to run, and also last run time = 'never' the times the task is meant to run come and go without the task running. Has anyone got any ideas? The task is definitely enabled.
Thanks.
 
Is the Task Scheduler service running?
 
Yes, it's marked as started when I log in to the server and is also set to start automatically.
 
If i select the task and select 'run' nothing happens. If I cut and paste the command and run it on the command line it works fine, so there's nothing rong with the command.

the task just never seems to run, even when I'm logged on to the server via terminal services watching it.
 
I had the same problem when running a simple batch file. Do not use the AT command. Use the scheduler program. I recreated the schedule task and entered the administrator account and it worked. I had used a new user (with administrator rights) for I do not like to use the admin every where and it never ran.
It worked for me.

The more things they break the more I learn
 
I'm already using 'Scheduled Tasks' in Control Panel - is that what you meant?

I've already got the task running under an administrators credentials. I had created a user specifically for the task beforehand but I switched it over when it didn't work as I thought it might be becuase of that.
 
I used:
Control PanelScheduled Tasks
and made sure I checked daily and the correct time.
I have 2 NT4 servers and use the AT command without a problem. However, with my 3 win2000 servers took me a while to set the schedule to run.
Good luck

 
What task are you running? I've had a few problems running Xopy batch files using the task scheduler. My workaround was to change the batch file text e.g.

xcopy c:\afile.txt f:\bfile.txt

to

cdxcopy c:\afile.txt f:\bfile.txt

My problem was that when the scheduled task kicked off the batch file it could not find the xcopy command. I resolved this by adding the cd\ command to ensure that the command started at the root of the drive and was able to find the specific commands. I found this also worked for the ping command.

Hope this of some use to you.

Stevie.
 
I'm using php to generate an RSS file, and using full paths to both the exe and for the arguments.

As I said it runs from the command line so I'm pretty sure it's not the task itself that's the problem.
 
Just to mention that if you create a batch file with e.g.

ping 123.45.67.8 -t

name it ping.bat and save it on the desktop, if you double-click it to run it, it won't run properly.

But if you change it to:

cdping 123.45.67.8 -t

name it ping.bat and save it on the desktop. it will run once clicked.

Both these are running by initiating the command promt but only one of them works.
 
I'm not using a batch file,
but I've just created another scheduled task, I set it to run a batch file with the ping command you described and this is not working either, so it looks like it's more a problem with the task scheduler itself, that or the user the tasks are running under (which is me, and I'm an administrator, so I don't think it's that).

I've checked that the Task Schedulaer service and the RPC service are both running, which they are, I don't know what else it could be.
 
Ensure that you use the new user's full account name i.e.

domain\user

when entering it into the scheduled task settings, also ensure that the new user has 'full access' to the location where the exe's reside.

S.
 
Yep, I'm already doing both of those.

The administrators group has full control of both the exe that is being run and te file that is being written to.
 
Is the file you are trying to execute on a networked drive?
 
I have found that simple batch files do not run if the Server is locked or logged off.

Just input.....

Cliff, CCNA/MCSE/MCSA 2000
Network Administrator
 
i have this issue all the time. for some reason scheduler has a hard time finding the working directory if it's not stated in the job setup. usually i work around this by making the first line of the script a "cd" to the dirtory where the batch file is stored. also, you may be calling other programs/utilities/batch jobs that are not in the PATH.

e.g.

file is in c:\scripts

c:\scripts> type test.bat

rem this is a test
c:
cd \scritps
start file.bat


 
Is there a way to create a schedule task so that a particular program runs only when IE or some other browser were to startup. Trying to get a asset program to automatically run without employee intervention when they work from home.
 
Sure, create a simple batch file that the user clicks on. You can make it open whatever program you like. The following opens IE and Adobe Acrobat 5.0 in Windows XP

start "IE" "c:\program files\internet explorer\iexplore.exe"
start "Adobe" "c:\program files\Adobe\Acrobat 5.0\Reader\acrord32.exe"

Cliff, CCNA/MCSE/MCSA 2000
Network Administrator
 
It turns out the problem with the scheduled tasks not running was caused by the mstask.exe service permanently being in the 'stopping' state. The server is scheduled for a reboot over night which should hopefully fix the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top