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:
in script, $_env['myvar'] should contain passed parameter.code:cd '/my/path/' ; export myvar="1"; /usr/bin/php -q twr.php > /dev/null
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Cron php program with argument
Ubuntu
Comments
Post a Comment