Get information about next scheduled task

nnCron and nnCron LITE discussion

Get information about next scheduled task

Postby John Doe » Tue, 24 Jan 2006, 05:43

Hi, is there any possibility to get info about the next task, which is to be scheduled (don't mention, the pc is switched off in the meantime). The idea is to do some regular events, like recording some pictures or broadcasts, which can be maintained in the very handy crontab format. For example we have the following original scheduled times:

30 7 * * 1-5 do job1 # comment: on monday till friday at seventhirty
0 12 * * 7 do job2 # comment: on sunday noon

A "maintainer job" should start a pre-action eg 2 minutes before each occurence. The interesting data would be job time, name, and some parameters, like "do", "job1" and "job2" in the example above.

Of course i could schedule 58 11 * * 7, but this lacks of clearity, and has the disadvantage, that at execution start we dont have automatically the right scheduled time.

Another possibility would be to to run the pc-clock always 2 minutes ahead (this is ok, but how to maintain a regular sync with internet time servers?)

The preferred method would be to maintain a seperate file or list with the scheduled times in crontab manner as above, but how can parsing be accomplished (i wouldn't code it a second time, since this is inside nncron already implemented)?

regards jd
John Doe
 
Posts: 4
Joined: Wed, 19 Jan 2005, 13:16

Postby VK » Tue, 24 Jan 2006, 13:13

Sorry, I'm not sure, I understand your request correctly. Try to explain it once again, if you think it is important for you.

The answers:

Currently there is no easy way to get the time of the next scheduled job in nnCron LITE. If I understand your problem right, you can try nnCron with it's _advanced_ syntax, which allows you to 'stack' the jobs and launch several jobs from one specific job, specifying pause between the jobs and using different user-specifyed conditions...
CU
VK
User avatar
VK
 
Posts: 680
Joined: Wed, 14 Jul 2004, 19:17

Postby John Doe » Tue, 24 Jan 2006, 13:24

Hi,
the question in short is:
Job1 runs every minute
Job2, Job3, ... Jobn are scheduled to run somewhere in the future, only once or repeating.

Is it possible for Job1 to get the time and some additional infos from the next run of Job2, ... Jobn ?

The other way round: is there a list within nnCron maintained and accessible by SPF, from which one can retrieve the next scheduled time and some other with job params ?

regards
John Doe
 
Posts: 4
Joined: Wed, 19 Jan 2005, 13:16

Postby VK » Tue, 24 Jan 2006, 13:48

No, as I said in my previous message, there is no easy way to get such an info. Try to read the 'ASSUMED-NEXT-TIME' word description ( http://www.nncron.ru/help/EN/commands/d ... SSUMEDTIME ). As far as I know this is the only word, that you can use at the moment.
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 1 guest