NNCron Light running a PHP command as a service

nnCron and nnCron LITE discussion

NNCron Light running a PHP command as a service

Postby Danwdoo » Tue, 09 Jan 2007, 10:23

I am trying to see if NNCron Lite can be used to run a php command for the CACTI network monitoring tool. The basic command is:

php C:\Inetpub\wwwroot\cacti\poller.php

My cron file is formated to have:

# Classic crontab format:
# Minutes Hours Days Months WeekDays Command

*/2 * * * * php.exe C:\Inetpub\wwwroot\cacti\poller.php

My goal is for it to run poller.php every 2 minutes. This works perfectly from the command line but not when running as a service which is a requirement for me so it always runs.

When run as service the log lists the command run with a status of 0 but nothing happens and the command itself does not appear to have run. I've seen others have had problems with PHP running as well. Is this just a limitation of nnCron that it can't do or am I doing something wrong? The process should take about 20 seconds to run before completing if that makes a difference. I've also tried including the command in quotes with no luck as well.


Posts: 1
Joined: Tue, 09 Jan 2007, 09:49

Postby Valery_Kondakoff » Tue, 09 Jan 2007, 14:21

I'm pretty sure this is 'working directory' issue. Try to set the full path to 'php.exe'. If this does not solve the problem, examine your php script if it contains relative paths.

User avatar
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 2 guests