Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: cron command

  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    97
    Thanks
    2
    Thanked 0 Times in 0 Posts

    cron command

    Hello, what does $object is for in this cron command ? will its value be usable in make.php and how ?

    thank you

    PHP Code:
    exec(php_path()." -q ".BASEDIR."/actions/make.php $object &> /dev/null &"); 

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Quote Originally Posted by paperino00 View Post
    Hello, what does $object is for in this cron command ? will its value be usable in make.php and how ?
    The value of $object will be inserted in to the command, and you can get to it in make.php by using $argv. For example:
    PHP Code:
    <?php echo $argv[0]; // outputs what was passed to make.php
    Also note that whatever $object is, it should probably be escaped if it hasn't been in the code before the exec() line.

  • #3
    New Coder
    Join Date
    Nov 2011
    Posts
    97
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Inigoesdr View Post
    The value of $object will be inserted in to the command, and you can get to it in make.php by using $argv. For example:
    PHP Code:
    <?php echo $argv[0]; // outputs what was passed to make.php
    Also note that whatever $object is, it should probably be escaped if it hasn't been in the code before the exec() line.
    If there is no $argv inside make.php $output value is useless in this command ?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •