APuppyDog Posted February 4, 2009 Share Posted February 4, 2009 hello, i am trying to setup a cron job with a path and string, example "php /path/to/file/filename.php?string=1" the cron job returns an error that no input file was specified... however, if i run the file with the following command http://www.mydomain.com/filename.php?string=1 then the string works as intended... any way to get this working with cron? Link to comment https://forums.phpfreaks.com/topic/143803-cron-job-with-variable-in-path-eg-filenamephpstring1/ Share on other sites More sharing options...
Philip Posted February 4, 2009 Share Posted February 4, 2009 Use $argv in the PHP script, and when calling it. call it like a command line: php /path/to/file/filename.php -string=1 Link to comment https://forums.phpfreaks.com/topic/143803-cron-job-with-variable-in-path-eg-filenamephpstring1/#findComment-754559 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.