Join the community today
Register Now

Cron job issue

Discussion in 'System Administration' started by amin, Jan 4, 2016.

  1. amin

    amin Member

    38
    6
    8
    Oct 11, 2014
    Ratings:
    +7
    Local Time:
    2:15 PM
    Katest
    Latest
    Hi,
    This is my crontab e:

    0 */4 * * * /usr/bin/cminfo_updater
    */2 * * * * php -q /home/nginx/domains/xxxxxx.com/public/crons/cron.php

    the second line is not running, while I can run it in the ssh with success. Any idea? I even restarted the crond process.

     
  2. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    11:45 AM
    1.9.9
    10.1.10
    Run
    Code:
    which php
    to get the full path to php (should be /usr/local/bin/php but just to be safe).
    Theb in crontab replace php with the full path.
     
  3. eva2000

    eva2000 Administrator Staff Member

    54,935
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,812
    Local Time:
    8:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. amin

    amin Member

    38
    6
    8
    Oct 11, 2014
    Ratings:
    +7
    Local Time:
    2:15 PM
    Katest
    Latest
    yes, it was php path issue, thank you :)