Link to home
Start Free TrialLog in
Avatar of perlwhite
perlwhiteFlag for United States of America

asked on

Windows Task Schedular

Hello,

I am trying to schedule a task on a daily basis that will run from 12.30 am to 11.40 pm.  I did schedule the task like that but it just runs once at 12.30 am and then stops. What should I do to make the task continuous?
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of perlwhite

ASKER

Dan,

It is not set to end, but it is.  That's what my question is.  I want my perl script to run from 12.30 am to 11.40 pm continuously.

The checking of the timing is done in the script.  So all task scheduler has to do is to run it at 12.30 am.
That's not the scheduler's fault, it's your script's fault.

The script ends. Task scheduler has no control over it, other than to start it.

So, if you cannot detail your need, all I can say is: keep your script from stopping...
Put it in a continuous loop and maybe check if it's past the time when you want it to stop.
Actually, I was thinking like this when I put the logic of stopping the script in it.

The script will continuously checks the current time and it is more than 11.40, it will not run for that day.  Now for the next day, the task scheduler will start it at 12.30 am.  I do not see any error in the logic.  

I have set the task scheduler on Daily - start -today at 12.30 am, and start the task if the time has passes/missed.

Let me know where am I going wrong?

P.S-  I also tried the perl script without having to check the time and let the task scheduler alone do the trick but it did not work
OK, put some debugging output in your script and see
1. if it starts
2. if your loop is actually working

I mean use a log file and write in it at the beginning of the script and on every iteration to see where it stops.

Your logic seems sound, but without actually seeing the code I can't say if it's ok.