NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Replicating Cron jobs on the local Windows test machine


Joined: 03 Nov 2007
Posts: 45
Reply with quote
I think that this is not possible in PhpED, but I will ask...

On the production server, I have a Cron job, mycron.php, where mycron.php is "below" the public area. It is not possible for a site visitor to run mycron.php, as they cannot reach it.

On my local Windows XP development computer, I cannot get phpED to run mycron.php.

The only way I can get it to work, is to create a local file, runmycron.php, which Includes mycron.php, and place it in the domain root folder

Is it possible for phpED to run scripts which are in these folders?
View user's profileFind all posts by computergeniusSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
PhpED can't run your scripts directly even if they are in the public area. What runs your scripts is web server, or cron daemon, or shell console, anything that runs on the remote server and is able to start processes. "Public" area limits only web server's ability to run scripts. With other ways, there are no such restrictions.
With PhpED you can open an ssh or telnet console on your server and run your scripts from there. In this case it does not matter if the scripts are in "public" area or not.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
The following might work for you...

Open a Command Prompt and execute
Code:
"C:\Program Files\Nusphere\PhpED\php5\php.exe" C:\PathToScript\mycron.php

Notes: Replace C:\Program Files\Nusphere\PhpED\php5 with the actual path to your PHP installation. The quotation marks are needed if the path includes spaces.

If that works, then add it to your Scheduled Tasks in the Windows Control Panel Wink

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website
Replicating Cron jobs on the local Windows test machine
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic