Using wincron to run the cmd.php, far better than task sch.

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
khutton
Cacti User
Posts: 77
Joined: Tue Jun 18, 2002 9:01 am
Location: Alexandria, Virginia
Contact:

Using wincron to run the cmd.php, far better than task sch.

Post by khutton »

I have been using task scheduler for awhile with somewhat mixed results. Sometimes it works sometimes it doesnt. I know why and its a problem that has no real reliable work around. So, I downloaded wincron and have had no problems since I got it running. My instructions are below. (raX, you might want to add this to the win32 instructions as an option)

Download wincron from http://www.wincron.com/download.htm
Just run the install and install it to c:\, it automatically creates c:\wincron
In the c:\wincron\sample scripts directory. I just edited the batch_file_test.tg file to contain this:

{
-name rdd
-start -inc 0 0 5 0
-command php c:\apache\htdocs\cacti\cmd.php
-command exit
}

Run wincron as a service, the wincron website has good instructions on how to do this. Once the service is running, click on the clock in the task bar and "load" the batch_file_test.tg file you edited to contain the above code. Now click the start button and your off and running.

This will make your cmd.php file run every 5 minutes. You can run it at whatever interval you want, but be sure to account for this in your cacti setup. Hope this hels some people with their scheduling problems.
donmc
Posts: 3
Joined: Wed Feb 12, 2003 10:51 am
Location: NE Florida
Contact:

WINCRON advanced - no DOS BOX as it runs...

Post by donmc »

Just for some additional "niceness" see my slightly modified version of a wincron script below, which stops the DOS box from appearing every time it runs... :P

Code: Select all

##
## run cacti logger
#  Don McC Feb 12th 2003
{ 
-name CACTI  

# Start now and run every 5 minutes
-start -inc 0 0 5 0 

# Run cacti logger 
-command -wait -hide php.exe c:\apache\cacti\cmd.php 
 
}
jlancaster
Posts: 38
Joined: Tue Feb 04, 2003 12:05 pm
Location: Dallas, TX
Contact:

Post by jlancaster »

I installed WinCron as a service and the DOS box went away. However, I had to create a user account with the appropriate rights--the system account gave me errors.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest