Solved

Windows Task Schedular

Posted on 2014-02-13
5
237 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 34

Accepted Solution

by:
Dan Craciun earned 500 total points
Comment Utility
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
Comment Utility
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 34

Expert Comment

by:Dan Craciun
Comment Utility
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
Comment Utility
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 34

Expert Comment

by:Dan Craciun
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
A procedure for exporting installed hotfix details of remote computers using powershell
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…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now