Executing php with crontab
Posted
by Stefan Konno
on Stack Overflow
See other posts from Stack Overflow
or by Stefan Konno
Published on 2010-04-22T08:34:53Z
Indexed on
2010/04/22
8:43 UTC
Read the original article
Hit count: 317
Hi everyone. I'm trying to run a php-script on a scheduled basis. So I'd thought crontab was a good idea. The server I'm using is on Linux which I'm not that familiar with. So the problem I'm having is, I don't know how make the script executable from php. I need to reference the script, or put it into a folder that can run php from the command line. So I don't know what path to give my crontab, for example:
5 * * * * var/www/some/path/script.php
I found some vague information about this php executable being found in
/usr/bin/php
But I can't find any php file in there, maybe I don't have it installed? My php5 and apache installation is in:
/etc/php5
So my question becomes, is there anyway to execute a php-script with crontab in any other folder, or do I just lack the php executable in usr/bin/php?
© Stack Overflow or respective owner