Skip to main content

Thread: Cron php program with argument


i have simple program should run in cron:

cd '/my/path/' ; /usr/bin/php -q twr.php 1 > /dev/null ;

runs fine command line, not cron! argument "1" or whatever need, ignored.

idea how solve it?


bye

ronald

you're saying passed parameter doesn't appear $argv[0] when run cron? strange.

use environment variable instead:

code:
cd '/my/path/' ; export myvar="1"; /usr/bin/php -q twr.php > /dev/null
in script, $_env['myvar'] should contain passed parameter.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Cron php program with argument


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support