Solved

Windows Task Schedular

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
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…

688 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