pass variables to cron'd php

pass variables to cron'd php

Posted by: carbon360
Posted on: 2006-02-06 09:06:00

Hi,
at my previous server I could use the following to pass a variable to a php script:
0 12 * * * php -f /home/<path>/cronjobs.php rau
(where 'rau' is the variable being passed)

but this doesn't work :(
Can anyone tell me how I should be doing it?

TIA :)

Re: pass variables to cron'd php

Posted by: Twirp
Posted on: 2006-02-06 18:20:00

I've never used Shell to set cron (I'm always worried about breaking it)
Why not try some remote one like http://webcron.org/index.php?lang=en
Hope this helps.

Re: pass variables to cron'd php

Posted by: carbon360
Posted on: 2006-02-07 01:06:00

I'm happy using cron, but need someone to confirm for me how to call php files.

Lead Web Dev,

Re: pass variables to cron'd php

Posted by: herods
Posted on: 2006-02-07 01:45:00

How are you accessing the parameter in the script?




Re: pass variables to cron'd php

Posted by: carbon360
Posted on: 2006-02-07 01:59:00

(

Tags: php scriptcron