Proble with nnCron Lite

nnCron and nnCron LITE discussion

Proble with nnCron Lite

Postby mmoore99 » Thu, 13 Jan 2005, 22:44

I am having a problem getting nnCron Lite to execute a batch file properly.

When I have my cron.tab set as follows nnCron attempts to execute the file at the appropriate time, but the command window only flashes on the screen for a few milliseconds and the batch file does not get executed.
Code: Select all
#CRONTAB FILE
# Classic crontab format:
# Minutes Hours Days Months WeekDays Command

* * * * * C:\Program Files\tyExtract\tyextract-all.bat

If I set the cron.tab as follows...nnCron attempts to execute the batch file and a command window appears on the screen and stays on the screen at a "c prompt", but the batch file does not get executed.
Code: Select all
#CRONTAB FILE
# Classic crontab format:
# Minutes Hours Days Months WeekDays Command

* * * * * cmd C:\Program Files\tyExtract\tyextract-all.bat


I am running Windows XP Professional, Service Pack 2. The nnCron log entries are as follows:
Code: Select all
11:27:04 6704 Load cron.tab
11:28:00 9296 Start: C:\Program Files\tyExtract\tyextract-all.bat
11:28:00 9296 Start result: 0
11:28:11 6704 Load cron.tab
11:29:00 6820 Start: cmd C:\Program Files\tyExtract\tyextract-all.bat
11:29:00 6820 Start result: 0


Any help would be appreciated.
mmoore99
 
Posts: 1
Joined: Thu, 13 Jan 2005, 22:31

Postby Valery_Kondakoff » Thu, 13 Jan 2005, 23:37

First try to enclose the path in double quotes:

Code: Select all
* * * * * "C:\Program Files\tyExtract\tyextract-all.bat"


or

Code: Select all
* * * * * cmd /c "C:\Program Files\tyExtract\tyextract-all.bat"


(note the /c switch!)

If this does not helps use the following command (this is one line):

Code: Select all
* * * * * cmd /c "C:\Program Files\tyExtract\tyextract-all.bat" > c:\output.txt


and look in the output.txt for cmd.exe output - there are good chances there is an error in the name of the bat-file or you need to specify the working dir for your bat-file.
CU
VK
User avatar
Valery_Kondakoff
Site Admin
 
Posts: 769
Joined: Thu, 01 Jul 2004, 20:49
Location: Moscow, Russia


Return to nnCron forum (English)

Who is online

Users browsing this forum: No registered users and 1 guest

cron