Question about missed tasks in nnCron lite

nnCron and nnCron LITE discussion

Question about missed tasks in nnCron lite

Postby alde » Thu, 24 Feb 2005, 12:28

Hi everybody.

I have a question about missed tasks using nnCron lite. I am cheking this point, but I am not able to nnCron works with this type of tasks.

I am testing the following example. Suppose at the moment time is 19:00 hours and date is 02/24/2005. Then I enter the following line in the cron.tab file:

@24 18 * * * 2005 notepad.exe

I'm using the year field and this one is active in the cron.ini file. The value for DefaultRunMissedTime variable is 365 days. So this task is missed from beginning.

The question is why nnCron lite doesn't execute that task immediately when reread the cron-tab file.

Also I have tried to stop the cron service and enter this line (suppose time now is 19:02).

@03 19 * * * 2005 notepad.exe

When time is 19:04 I restart the cron service, but it also doesn't launch this task.

However, if time now is 19:05 and I enter this line in cron.tab file:

@05 19 * * * 2005 notepad.exe

And I don't stop the service, nnCron lite launch well the task (but then this one is not a missed task).

Any idea?
alde
 
Posts: 6
Joined: Thu, 24 Feb 2005, 11:52

Re: Question about missed tasks in nnCron lite

Postby VK » Thu, 24 Feb 2005, 14:13

alde wrote:Suppose at the moment time is 19:00 hours and date is 02/24/2005. Then I enter the following line in the cron.tab file:
@24 18 * * * 2005 notepad.exe
So this task is missed from beginning.

nnCron LITE writes a date/time when the task was added/modified to etc\taskinfo.txt. If this date is larger than the date when the task was supposed to run - the task is _not_ missed.

Also I have tried to stop the cron service and enter this line (suppose time now is 19:02).
@03 19 * * * 2005 notepad.exe
When time is 19:04 I restart the cron service, but it also doesn't launch this task.

This is exactly the same as the previous example. You stopped nnCron LITE, added the task and then started nnCron LITE again. The program looks at the cron.tab, sees the new task and writes the date when the task was added to the etc\taskinfo.txt. This date is larger than the time when the task was supposed to run, so the task is not missed.

If you want to emulate the missed task behavior, do the following:

- add the task to the cron.tab and wait until nnCron LITE re-read the cron.tab. (You may force this by invoking 'cron.exe' with the option '-reload')
- stop the nnCron LITE and wait until the execution time is missed.
- now start nnCron LITE again: the mised task will be executed ad the top of the next minute...

HTH!
CU
VK
User avatar
VK
 
Posts: 680
Joined: Wed, 14 Jul 2004, 19:17


Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 2 guests