Quick CRON Question

Status
Not open for further replies.

deadimp

New Member
Messages
249
Reaction score
0
Points
0
To execute a basic PHP script from CRON, would I use the following command?
Code:
php /home/etc/script.php
Is there a way to test a CRON script by executing it once, or will it only allow execution by the data parameters?

EDIT: The directory for php (/usr/sbin ?) is in the PATH variable (or whatever the Linux equivalent is), right?
 
Last edited:

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
For setting a cron script to run just use the cPanel cron features. Under advanced menu.

For running it once set it to run like every 5 minutes and once its run once then delete it.

I believe that it is in the path variable, although i'm not sure.
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Try using php -q without the path.

ex:
php -q /home/corey/public_html/myscript.php
 
Status
Not open for further replies.
Top