Cronjob doesn't execute the tasks

Discussion in 'Installation/Configuration' started by vaio1, Apr 28, 2017.

  1. vaio1

    vaio1 Member

    I am trying to understand why the cronjob shows me the cron execution task bat the task is not executed! I mean that the syslog shows me correctly all the cron execution log but if I check the website task is not executed.
    I have created a test.php file that send an email and set the cronjob by the ISPConfig panel.
    I have executed the test.php file by calling it by the browser and I have received the email.
    The syslog:

    thanks guys!
  2. edu_tomasi

    edu_tomasi New Member

    Can you post the crontab line that you inform this command line.
  3. vaio1

    vaio1 Member

    The command line is:

  4. florian030

    florian030 Well-Known Member HowtoForge Supporter

    you can run /usr/bin/wget --use... on the shell to see any errors.
  5. vaio1

    vaio1 Member

    this is the result:

    but if I call the script by the browser, it works! really odd!

    Last edited: Apr 28, 2017
  6. vaio1

    vaio1 Member

    It's really odd! I have executed two times the same code but I get 2 different results:
  7. vaio1

    vaio1 Member

    I have discovered another thing:
    I have changed the call method from a direct http link to the bash command:
    • BEFORE: /usr/bin/wget --verbose --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -t 1 -T 7200 ''
    • AFTER: /usr/bin/php /var/www/
    Now when the Crontab is executed it doesn't generate any error but the bash command doesn't execute the code in the php and the email message is not sent BUT if I call by the SHELL this command:

    I receive the mail message! Why?!?!?

    thanks for the patience!
  8. vaio1

    vaio1 Member

    Good morning guys,
    I am investigating about the cronjob issue on my servers. Seems that the scripts are not executed for an enviroment variables configuration issue.

    These are my Enviroment Variables:

    Could be this the problem?
  9. vaio1

    vaio1 Member

    The problem has been solved setting the FULL CRON mode in the user profile!

Share This Page