Learn about Centmin Mod LEMP Stack today
Become a Member

Cron job issue

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

  1. amin

    amin Member

    37
    6
    8
    Oct 11, 2014
    Ratings:
    +7
    Local Time:
    5:50 AM
    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:
    3:20 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.
     
    • Informative Informative x 3
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    30,838
    6,903
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,393
    Local Time:
    12:20 PM
    Nginx 1.13.x
    MariaDB 5.5
    • Informative Informative x 1
  4. amin

    amin Member

    37
    6
    8
    Oct 11, 2014
    Ratings:
    +7
    Local Time:
    5:50 AM
    Katest
    Latest
    yes, it was php path issue, thank you :)
     
    • Like Like x 2