eZ Community » Forums » Developer » Argument runcronjob
expandshrink

Argument runcronjob

Argument runcronjob

Friday 27 September 2013 10:25:59 am - 1 reply

Hello,

Is it possible to create a new argument when executing runcronjob ?

exemple :

php runcronjob.php -s gestion -test test_argument <nom_of_cron>

Friday 04 October 2013 1:49:57 pm

Hi,
yes, it's possible you'll have to add the arg code to you cronjob, for instance

gestion_cron.php -test piu

<?php

foreach( $GLOBALS['argv'] as $argument )
{
    if ( $argument == '-test' )
    {
        print_r( $GLOBALS['argv'][2] );
    }
}

?>

Hope it helps

Modified on Friday 04 October 2013 1:52:49 pm by Pedro Resende

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from