Discussion Locked

I need help with a script

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello,
I need help running this batch file.

at 15:55 cmd /c "C:\initlo\initlo.exe > c:\initlo.log"

Or

at 15:05 cmd /c "C:\initlo\initlo.exe -g 10 -p C:\logoff.exe > c:\initlo.log"

this is a script used to logoff the user at a certain time.
the problem is the script will run and the task will be added to the scheduled tasks on the computer.
but when the time comes for the job to run it will just sit there. it will not run. when I click on it and hit run now it will immediatelylog me off.
I can't think where the problem is at. I have tried different users as the at service account.
any help would be great
Thanks
Dan

3 replies

by jmj28

Since you are using the at command in the script you should not have to enter this into the scheduled tasks program. But if you want it to be there, remove the at commands and just have it run the cmd portion of the command and specify the time through task scheduler. It probably happens that the script is recognized but after the PC turns to the specified time i.e(Your computer runs the script at 15:05.00 and by the time that it gets to the line in the script to call the command it is already 15:05.0001) Therefore it probably wouldn't run for another day. Hope this helps.

This discussion is closed to new replies.