Rule: DATE-INTERVAL: I can't works it properly [solved]

nnCron and nnCron LITE discussion

Rule: DATE-INTERVAL: I can't works it properly [solved]

Postby billox » Sat, 02 Apr 2011, 19:43

Hi,
I'm tried to run this script. I must execute this script every 5 days at 8:00 AM.
It launches a program to change wallpaper.

I tried to use "Rule: DATE-INTERVAL:".

Code: Select all
RunMissed: 4
AsLoggedUser
Time: 0 8 * * * *
\ Every 5 days from March 28, to April 2 next year.
Rule: DATE-INTERVAL: 28.03.2011-02.04.2012/5
Action:
... ... ...


Today is April 2, (the first "fifth day") and the Action works fine, but instead of run at 8 AM, it runs at midnight this night.
The log:
Code: Select all
00:00:00 2464 TASK [missed]: My_Script
00:00:16 2464 Start: C:\Utility\Panorama\Panorama.exe
00:00:16 2464 Start result: 0
00:01:02 1308 Service stopped.
17:50:53 1804 Start nnCron
17:51:00 1804 Load crontab
17:51:00 1804 C:\Programmi\nnCron\nncron.tab
17:51:01 2244 Console server is started.
17:51:01 2272 TASK [missed]: My_Script
17:51:16 2272 Start: C:\Utility\Panorama\Panorama.exe
17:51:16 2272 Start result: 0

At midnight my pc was on, and nncron ran script, instead of at 8 am.
Then, at 01.02 I turned off my pc.
But at 17.51, when I turned on my pc, script ran again.

Maybe problem is flag "RunMissed"?
Any solutions?

Thanks in advance.
Last edited by billox on Thu, 07 Apr 2011, 21:14, edited 1 time in total.
billox
 
Posts: 9
Joined: Sat, 02 Apr 2011, 19:18

Re: Rule: DATE-INTERVAL: I can't works it properly

Postby billox » Thu, 07 Apr 2011, 21:14

Ok, I solved the puzzle.
I used simply Time: 00 08 * * * *

and then I customize this script read from LuckMan212 post:
#( task_to_run_every_3days
\ this will run every 3 days at 6pm
Time: 0 18 * * * *
Action:
FILE-EXIST: "3days.sem" 0=
IF
FILE-CREATE: "3days.sem"
ELSE
CUR-DATE
FILE-CREATION-DATE: "3days.sem"
DATE- 2 >
IF
\ ... do your important stuff here ...
FILE-DELETE: "3days.sem"
FILE-CREATE: "3days.sem"
THEN
THEN
)#

Now, please, anyone want to help me with a new question?
I open this new thread.
billox
 
Posts: 9
Joined: Sat, 02 Apr 2011, 19:18


Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 2 guests

cron