Solved

Windows Task Schedular

Posted on 2014-02-13
5
252 Views
Last Modified: 2014-03-25
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?
0
Comment
Question by:perlwhite
  • 3
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 500 total points
ID: 39856687
A: Don't end the program.

Task scheduler is designed to start programs, not to keep them opened.

If you can tell us what it is that you want to achieve, maybe we can find a different approach than scheduling tasks?

HTH,
Dan
0
 

Author Comment

by:perlwhite
ID: 39856760
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.
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39856769
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.
0
 

Author Comment

by:perlwhite
ID: 39856797
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
0
 
LVL 35

Expert Comment

by:Dan Craciun
ID: 39856900
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.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked if I could set up a fax machine so that incoming faxes were delivered to people's Exchange inboxes and so that they could send faxes from their desktops without needing to print the document first.  I knew it was possible but I had no id…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question