php cron = php cli script? -


i need write php script needs executed every 10 mins, i'm going setup cron job this:

*/10 * * * * /usr/local/bin/php -q /path/to/my/file.php 

according to: running php script cron job - timeout issues?

there no timeout command line script, means when running cli script set_time_limit doesn't need extended

i have few questions regarding this:

  1. if run php using: */10 * * * * /usr/local/bin/php -q /path/to/my/file.php, file.php become command line script (which means won't timeout)?

  2. do have add line: #!/usr/bin/php -q inside file.php?

  3. according to: http://www.php.net/manual/en/features.commandline.introduction.php have make sure cli enabled (--enable-cli) mean if php running cgi (ie. fastcgi) or cli not enabled (--disable-cli) can't setup cron @ all?

please advise.

/usr/local/bin/php runs php file
1) dont have timeout
2) no
3) if php runs in command line cron run.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -