Re: Pass parameters via url inside a php cron job

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merlin Morgenstern wrote:
Hi there,

I would like to run a php file via cron job and there is a parameter to be passed. Unfortunatelly this does not work:

# /usr/local/bin/php /home/www/create_notification_emails.php?tf=2
Could not open input file: /home/www/create_notification_emails.php?tf=2

The problem seems to be the ?tf=2

How do I pass parameters to this script? I need the same script but executed in different time frames which is passed by the parameter.

Any ideas?

Thank you for any hint,

Merlin

Hi Merlin,

Commandline arguments (for things like Cron) are a bit different than URL parameters.

Try lookup information on argv and argc:

http://www/php.net/features.commandline
--

Aschwin Wesselius

/'What you would like to be done to you, do that to the other....'/

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux