Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cron Jobs calling a PHP script with variables

Tags:

php

cron

Is it correct to use the following command in a cron job:

/usr/bin/php -q /home/**/public_html/scores.php?date=12/05/2009

I haven't found any supportive article / material to answer it, hence i am putting forth this question to the community.

So the question is is there a way for me to include a variable in a cron job calling a PHP script?

Thanks

like image 889
Nick Avatar asked Oct 06 '10 13:10

Nick


1 Answers

in cron jobs, here is how you should pass the argument

/usr/bin/php -q /home/**/public_html/scores.php date=12/05/2009

*take note there is no "?"

like image 61
Dennis Avatar answered Oct 24 '22 23:10

Dennis