tags:

views:

133

answers:

4

I need to have a query string in my crontab but it isn't working. Can someone please tell me how I can do this?

Thanks

+1  A: 

PHP on the command line doesn't take arguments like that.

http://php.net/manual/en/features.commandline.php

$ php file.php arg1 arg2

file.php

<?php
print_r($argv)
scragar
Thanks. Without spending a lot of time reading and hunting through the docs, can you please tell me what my options are? I have to have thing back up and runnuing in about 2 hours.
Thanks Scragar! I'll try that.
+1  A: 

$ php example.php param1=value1 param2=value2

example.php:

<?php
echo "param1:" . $param1 . " ";
echo "param2:" . $param2;
Frost
A: 

You could follow the example by @scragar, or you could alternatively run wget and then pipe the output to null.

A: 

wget example:

$ wget http://your%5Fhost/example.php?param1=value1&amp;param2=value2 2 > null

Frost