Missed Tasks Handling

Besides possessing the conventional scheduler features (starting tasks at specified time or with specified frequency), nnCron LITE provides the users an opportunity to manage so called missed tasks (similiar functionality is provided in UNIX world by Anacron - special add-on to "classic" Cron).

Missed task is a task, which has not been ran at scheduled time because nnCron LITE was not started or your PC was not turned on. If your PC is not running 24 hours a day, you may want to use a special syntax when defining important tasks to launch the task at scheduled time or at the first opportunity if it was impossible to start the task at the scheduled time. In other words, if the task becomes missed, it will be started at the top of the first minute after nnCron LITE startup. nnCron LITE checks for missed tasks every crontab reloading.

There is a syntax which is used to handle missed tasks (prepend @-symbol before the time in cron-format):

@<time_in_cron_format> <command>

Add this line to your crontab if you want to define a task, which should be started daily at 11:00 or at the first opportunity if scheduled time is already missed:

@0 11 * * * c:\your_app.exe

There is another one example. Let's assume, that user wants to delete temporary files on his local disks every Sunday at 23:30. There is how this task may looks like:

30 23 * * 7 :\utils\cleanup.exe

There is one shortcoming of this task: temporary files will not be deleted for a two weeks if user's PC will be turned off on the next Sunday at 23:30. If the user does not want to wait for such a long time, he may want to use missed tasks handling:

@30 23 * * 7 :\utils\cleanup.exe

Now, the task that was unable to start at Sunday, 23:30 will launch "at the first opportunity" - when user will turn his PC on: for example at Monday, 08:00.

nnCron LITE stores all the data that is needed for missed tasks handling in a file etc\taskinfo.txt. Users also can specify maximum waiting time (in hours and minutes) that may elapse since the task was sheduled to run for the last time. cron.ini variable DefaultRunMissedTask: is used for this purpose. The missed task will not be run if DefaultRunMissedTime: value is smaller than the time elapsed since this task was sheduled to run for the last time.