?
Solved

Windows Task Schedular

Posted on 2014-02-13
5
Medium Priority
?
266 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 1000 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

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 …
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
Suggested Courses

771 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