Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Task Scheduler
Message
De
20/09/2010 14:37:44
 
 
À
20/09/2010 07:51:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01481965
Message ID:
01482054
Vues:
68
>Hi All,
>
>I'm trying to access the windows task scheduler from Visual Foxpro to track various tasks setup on different stations to make sure they've run.... kind of a task monitor display program. I've managed to dump the tasks on each station into a textfile and parse the file with visual foxpro but I'm having a bit of trouble determining if a task missed parts of it's schedule.
>
>Weekly Job, M-F, startsup at 8:00am, repeats every hour. If something happens during a run and the job fails the task scheduler just continues with a status of running and updates the next run date/time. Is there a way trapping when a job misses a specific time or is there some software out there that does a better job of handling tasks ?

If the issue is just that a task that doesn't run properly "hangs", IIRC there is a setting in the task scheduler that can terminate it if it runs longer than X amount of time. So, for example, if you run a job every hour, and it never takes more than 10 minutes if it runs properly, you can set the termination time to be (say) 20 minutes.

I don't know in that case if you get any sort of result code back e.g. "terminated because of running too long".

The Windows Task Scheduler is pretty general-purpose, it doesn't have any magic smarts that can tell you details about why part of a task it's running isn't working properly. For that you need some co-operation from the tasks themselves, e.g. they can write log file(s), set ERRORLEVELs in .BAT/.CMD files, etc.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform