English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I know how to setup a crontab job, but when I schedule a PHP job it never runs.

2006-11-04 11:39:21 · 2 answers · asked by PrayerRequestBox 3 in Computers & Internet Internet

2 answers

You need to verify that GoDaddy's PHP installation includes a command-line interpreter. If it does, its location must be referenced within the script, for example:

#!/usr/bin/php
// script starts here
?>

Alternatively, the interpreter must be called explicitly in the command line, for example:

/usr/bin/php myscript.php

If there is no command-line interpreter on the system, you need to call a command-line browsing utility such as lynx or wget, which would activate your script via HTTP.

2006-11-06 05:06:55 · answer #1 · answered by NC 7 · 0 0

You cant execute a php script by calling itself because the php runs from within the web server!

Your best option is to set up cron to run
"lynx - source http://youraddress/yourphp.php"

lynx is a command line web browser which most linux systems have installed by default!

2006-11-04 20:08:16 · answer #2 · answered by str1der 3 · 0 0

fedest.com, questions and answers