nnCron Lite Is Not Running My Tasks In Cron.tab

A

Art Iculos Libres

I was interested in nnCron's ability to handle "missed tasks", and knowing
that it was recommended as PricelessWare, I installed the Lite version.

Set up is simple enough it seems. However, after creating the tasks in the
cron.tab file according to the Cron specification / syntax, nnCron Lite
does not run the tasks.

Things to note:

- OS is WinXP Pro SP2 (does nnCron not work with SP2? - everything else on
my PC works with SP2). I have never used any version of nnCron on any other
OS, so I can't confirm whether it would work on win 98, XP SP1, etc.;

- Cron was successfully loaded as a service ... cron.exe shows in Task
Manager;

- Using FileMon from SysInternals, cron.exe can be seen accessing the
cron.tab file each minute as it is supposed to do;

- I have Data Execution Prevention turned on for all applications, and even
though cron.exe did not cause DEP to throw a flag, I included cron.exe in
the exclusions list as a long shot ... this did not help;

- I originally had four tasks in cron.tab using the "missed task" character
("@") on each. To test if this was an issue, I removed the "@" and this did
not help; furthermore, I deleted all of the tasks and replaced them with a
very simple, single task to see if it would run ... no go;

- I ran "cron.exe -reload" after each change of cron.ini and cron.tab to no
avail;

- The log file shows that cron.exe is successfully being loaded and run;

- The tasks in the cron.tab file all run when manually launched;

- I have adequate permissions to run cron as a service in my profile;

- Other "grabbing-at-straws" fixes (too numerous to mention) tried without
success.


Here is my cron.tab:

#CRONTAB FILE
# Classic crontab format:
# Minutes Hours Days Months WeekDays Command
# M H D M WD C

@30 5 * * 1,4 H:\My Documents (H)\Batch Files\XXCopyBackups\Main1AB.bat

@30 5 * * 2,5 H:\My Documents (H)\Batch Files\XXCopyBackups\Main2AB.bat

@30 5 * * 3,6 H:\My Documents (H)\Batch Files\XXCopyBackups\Main3AB.bat

@0 0-23/4 * * H:\My Documents (H)\Batch
Files\XXCopyBackups\MainHourlyAB.bat

Even though the nnCron Lite documentation says you don't have to use quotes
( " ") around paths with spaces, I tried it both ways. Neither way worked.
I also tried with no line feeds between each task ... no go.

Hopefully there is something simple I'm missing in the syntax. As I read
the syntax rules and wrote the tab file at 3:00 am, this is very possible.
:)

nnCron has a forum, but it requires forum registration to post and
additionally, it doesn't seem to have much traffic, so I chose to post
here.

Any help is appreciated.

Thank you.

PS

I didn't really want to bring this up in the main discussion as I thought
it might confuse the issue if it was irrelevant. However, upon first
installing nnCron Lite, I checked the nnCron log and it showed several
instances of the same message indicating an error accessing
"etc\taskinfo.txt". I looked up this file in nnCron Lite Help and it says
that this is the file where information regarding missed tasks is stored. I
created a subdirectory "etc" (sub of the nnCron Lite application directory)
and placed an empty text file named "taskinfo.txt" in it. I reloaded nnCron
Lite using the "-reload" switch and the error message disappeared.
Wondering if this subdirectory file should have been automatically created
during installation, I uninstalled nnCron Lite and reinstalled; it still
didn't create the subdirectory / file which I had to again manually create.
Why is this happening? Is it related perhaps to the other issues above?

Again, thank you.
 
J

J. S. Pack

I was interested in nnCron's ability to handle "missed tasks", and knowing
that it was recommended as PricelessWare, I installed the Lite version.

Set up is simple enough it seems. However, after creating the tasks in the
cron.tab file according to the Cron specification / syntax, nnCron Lite
does not run the tasks.

Things to note:

- OS is WinXP Pro SP2 (does nnCron not work with SP2? - everything else on
my PC works with SP2). I have never used any version of nnCron on any other
OS, so I can't confirm whether it would work on win 98, XP SP1, etc.;

- Cron was successfully loaded as a service ... cron.exe shows in Task
Manager;

- Using FileMon from SysInternals, cron.exe can be seen accessing the
cron.tab file each minute as it is supposed to do;

- I have Data Execution Prevention turned on for all applications, and even
though cron.exe did not cause DEP to throw a flag, I included cron.exe in
the exclusions list as a long shot ... this did not help;

- I originally had four tasks in cron.tab using the "missed task" character
("@") on each. To test if this was an issue, I removed the "@" and this did
not help; furthermore, I deleted all of the tasks and replaced them with a
very simple, single task to see if it would run ... no go;

- I ran "cron.exe -reload" after each change of cron.ini and cron.tab to no
avail;

- The log file shows that cron.exe is successfully being loaded and run;

- The tasks in the cron.tab file all run when manually launched;

- I have adequate permissions to run cron as a service in my profile;

- Other "grabbing-at-straws" fixes (too numerous to mention) tried without
success.


Here is my cron.tab:

#CRONTAB FILE
# Classic crontab format:
# Minutes Hours Days Months WeekDays Command
# M H D M WD C

@30 5 * * 1,4 H:\My Documents (H)\Batch Files\XXCopyBackups\Main1AB.bat

@30 5 * * 2,5 H:\My Documents (H)\Batch Files\XXCopyBackups\Main2AB.bat

@30 5 * * 3,6 H:\My Documents (H)\Batch Files\XXCopyBackups\Main3AB.bat

@0 0-23/4 * * H:\My Documents (H)\Batch
Files\XXCopyBackups\MainHourlyAB.bat

Even though the nnCron Lite documentation says you don't have to use quotes
( " ") around paths with spaces, I tried it both ways. Neither way worked.
I also tried with no line feeds between each task ... no go.

Hopefully there is something simple I'm missing in the syntax. As I read
the syntax rules and wrote the tab file at 3:00 am, this is very possible.
:)

nnCron has a forum, but it requires forum registration to post and
additionally, it doesn't seem to have much traffic, so I chose to post
here.

Any help is appreciated.

Thank you.

PS

I didn't really want to bring this up in the main discussion as I thought
it might confuse the issue if it was irrelevant. However, upon first
installing nnCron Lite, I checked the nnCron log and it showed several
instances of the same message indicating an error accessing
"etc\taskinfo.txt". I looked up this file in nnCron Lite Help and it says
that this is the file where information regarding missed tasks is stored. I
created a subdirectory "etc" (sub of the nnCron Lite application directory)
and placed an empty text file named "taskinfo.txt" in it. I reloaded nnCron
Lite using the "-reload" switch and the error message disappeared.
Wondering if this subdirectory file should have been automatically created
during installation, I uninstalled nnCron Lite and reinstalled; it still
didn't create the subdirectory / file which I had to again manually create.
Why is this happening? Is it related perhaps to the other issues above?

Again, thank you.

I'm no expert on nncron lite, but it runs very well for me under XP SP2,
never misses a task (and I use the missed task syntax as well). I really
like it a lot.

Well, your crontab file looks good to me. I assume it's in the cron
directory and correctly named cron.tab. I assume it's clean, i.e., no weird
chars or wrapping. I don't use blank lines between my entries, but it's not
supposed to make any difference.

I wonder if there's some problem about the path names having parentheses or
being rather long.

You've probably already tried this, but have you tried making a simple path
like: C:\test.bat or just notepad.exe with a simple entry, like:

0 8 * * * notepad.exe

Let the time be 3 minutes into the future. See if it executes. Build from
there. Copy a .bat file into c:\temp and try to execute it.

I assume there's no problem about permissions and attributes on the cron
dir and on the dir where the execs reside, but this seems to be implied by
the error message you got. Cron made its own etc dir on my machine but I
don't know whether it was at installation or not.

Sorry to be more encouraging than helpful, but maybe this will spark
something. Hope you'll let us know if you solve the problem.
 
A

Art Iculos Libres

On Mon, 27 Sep 2004 23:53:28 GMT, Art Iculos Libres
I'm no expert on nncron lite, but it runs very well for me under XP SP2,
never misses a task (and I use the missed task syntax as well). I really
like it a lot.

Well, your crontab file looks good to me. I assume it's in the cron
directory and correctly named cron.tab. I assume it's clean, i.e., no weird
chars or wrapping. I don't use blank lines between my entries, but it's not
supposed to make any difference.
Sorry to be more encouraging than helpful, but maybe this will spark
something. Hope you'll let us know if you solve the problem.

Thanks for the encouragement and food-for-thought. I didn't really think XP
SP2 was the culprit, but I thought I'd throw it out there just in case.
However, you mentioned "weird formatting" and for some reason, that rang a
bell. I opened the cron.tab file in my default text editor (Metapad) and
looked in the lower left-hand corner where the file format is shown. It
said Unix. It should have said DOS! Somehow, I accidentally saved the tab
file in Unix instead of DOS text.

Anyway, I saved cron.tab back to DOS text format, set up a test task and
the task ran successfully. Well, almost. The command console which should
have been launched flashed for a split second, but the actual XXCopy backup
wasn't performed. I checked the nnCron logs and everything appeared OK; the
main log showed the task was started and the taskinfo.txt file now showed
the "missed task" info.

So, the next logical step was to put quotes around the nnCron task to see
if it would run XXCopy (I had tested both ways previously, but of course it
didn't matter because the file had been saved as a Unix format text file).
Anyway, after wrapping the command path in quotes, the XXcopy backup task
was launched and actually performed as expected.

Next, I tested the same XXCopy batch file task without quotes, but used a
simpler path (D:\Backups\Main2AB.bat instead of H:\My Documents (H)\Batch
Files\XXCopyBackups\Main2AB.bat). This time the task ran without the
quotes. Hmm.

I'm not quite sure why in the absence of quotes nnCron launched the task
specified by the longer, complex path name but the actual XXCopy backup
didn't happen (console flashed but XXCopy didn't run). I think this has
more to do with passing info to the console than with nnCron, but that
still doesn't make full sense to me. Nevermind, as I prefer using the
standard quotes that are generally required by command line programs
anyway. I'll just use quotes on all the nnCron tasks as it can't hurt, and
as I've discovered, it may actually be necessary in some cases.

Thanks again for the reply.

(By the way, I ended up registering for the nnCron forum and posted my
query there as well. No responses as of yet, but I'll go ahead and post my
findings to wrap up that thread.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top