Using "Weekdays" in nncron

nnCron and nnCron LITE discussion

Using "Weekdays" in nncron

Postby raj_praveen » Thu, 28 Sep 2006, 07:52

Hello,
I have issues in trying to use the keyword "Weekdays" within the crontab file. In specific, I am trying to run a batch file on a set of specific days (i.e. Mon., Wed., Fri.) during a date and time interval period. I am trying to do something like this below and the nncron crashes with a stack error. Any idea where I am wrong?
Any suggestion will be highly appreciated.

Best regards,
Praveen

#( Check_Weekday_Date_Time_Interval

Rule: DATE-INTERVAL: 10.08.2006-10.08.2006 INTERVAL: 10:20-10:49/00:01 AND Weekdays: 1 AND
Rule: DATE-INTERVAL: 10.08.2006-10.08.2006 INTERVAL: 10:20-10:49/00:01 AND Weekdays: 3 AND
Rule: DATE-INTERVAL: 10.08.2006-10.08.2006 INTERVAL: 10:20-10:49/00:01 AND Weekdays: 5 AND
Action:
START-APP: C:\run.bat
)#
raj_praveen
 
Posts: 4
Joined: Thu, 28 Sep 2006, 07:41

Postby Lynx » Thu, 28 Sep 2006, 09:02

Weekdays works in a different way.
Code: Select all
#( Check_Weekday_Date_Time_Interval
Weekdays: 1, 3, 5
Rule: DATE-INTERVAL: 10.08.2006-10.08.2006 INTERVAL: 10:20-10:49/00:01 AND
Action:
START-APP: C:\run.bat
)#


PS. Didn't you try to use Time-construction?
Time: <Minutes> <Hours> <Days> <Months> <WeekDays> <Years>
Time: 20-49 10 10 8 1,3,5 2006
User avatar
Lynx
 
Posts: 321
Joined: Thu, 04 May 2006, 20:07
Location: Уфа

Postby raj_praveen » Fri, 29 Sep 2006, 06:07

Thank you Lnyx, for your reply and suggestions. Opens me up to new knowledge. I am not aware how "Time" construct works, but if I could get it done through it, great !
I tried something like this below:

#( check_for_week_day

\ Time: <Minutes> <Hours> <Days> <Months> <WeekDays> <Years>
Time: 59-3 11-12 29-30 9 3-5 2006
Action:
MSG: "Today is a Wonderful Day"

)#

I expected that only between 11:59 and 12:03 hours a pop-up message will appear. I did get pop-up message from 11:59 to 12:03, but I also got another pop-up message at 12:59. Is this the way it is supposed to work? Otherwise am I missing something?
Please kindly clarify. Any help is highly appreciated.

Best regards,
Praveen
raj_praveen
 
Posts: 4
Joined: Thu, 28 Sep 2006, 07:41

Postby Lynx » Fri, 29 Sep 2006, 06:50

Code: Select all
Time: 59-3 11-12 29-30 9 3-5 2006

This specification means that you need to run task from 59 to 3 minutes at 11 and 12 o'clock. I never tried to set interval crossing 00 minute, but I think this would not work just as you want.
If I were you, i'd try at first to set Time: 59-3 11 29-30 9 3-5 2006, but I think it would start task at 11:00-11:03 and at 11:59. If so, you'll need to divide time specification in two parts:
Code: Select all
Time: 59 11 29-30 9 3-5 2006
Time: 0-3 12 29-30 9 3-5 2006

More information here.
User avatar
Lynx
 
Posts: 321
Joined: Thu, 04 May 2006, 20:07
Location: Уфа

Postby raj_praveen » Fri, 29 Sep 2006, 08:40

Thanks again Lynx. Meanwhile, going back to the previous post of the code, which is:

#( Check_Weekday_Date_Time_Interval
Weekdays: 1, 3, 5
Rule: DATE-INTERVAL: 10.08.2006-10.08.2006 INTERVAL: 10:20-10:49/00:01 AND
Action:
START-APP: C:\run.bat
)#

When I try to add this code within nncron.ini file, the line on "Weekdays" comes up with a CRONTAB syntax error.
raj_praveen
 
Posts: 4
Joined: Thu, 28 Sep 2006, 07:41


Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 1 guest

cron