Cron Job not working

Discussion in 'General' started by DavideR, Dec 29, 2021.

  1. DavideR

    DavideR Member HowtoForge Supporter

    Hi,
    for a domain I've setup a cronjob to run a page in php
    this is the config in ISP panel
    the file have 755 permission
    /usr/bin/curl https://ticket.host/inc/mail/hesk_pop3.php?key=9sCAnUfdfsdfdffsfd
    Minute */5
    If I run manually the command working correctly, but not the schedule.
    I need it every 5 minute
    in /var/log/syslog I found only the 2 time that i've lounced manually and nothing else.
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Remove /usr/bin/curl and leave just the url.
     
  3. DavideR

    DavideR Member HowtoForge Supporter

     
  4. DavideR

    DavideR Member HowtoForge Supporter

    HI,
    today I've to reopen this thread because the CronJob stop working by its self. I've no change anything in server or site by last time.
    If I run manually it work correctly but the cron won't start.
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What happens when the cron job starts? In what way is it not working? Is cron disabled for that user? Any info in logs? Have you set e-mail address to receive reports from cron job results?
     
  6. DavideR

    DavideR Member HowtoForge Supporter

    Hi,
    i've no log of cron, only if I run manually. where I can find some extra information? where i can setup email for cronjob result?
     
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Can you share the current settings of the cronjob?
     
  8. DavideR

    DavideR Member HowtoForge Supporter

    Hi,
    on screenshot you will see the config.

    I've delete only fqdn
     

    Attached Files:

    Last edited: Feb 23, 2022
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Looks good to me. Can you check in /etc/cron.d if the cronjob exists there?
     
  10. DavideR

    DavideR Member HowtoForge Supporter

    in cron.d I've ispc_web5 file that contain this:
    */5 * * * * web5 /usr/bin/wget --no-check-certificate --user-agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0' -q -t 1 -T 7200 -O /var/www/clients/client3/web5/private/cron_wget.log 'https://XXXXX/inc/mail/hesk_pop3XXXXXX' >>/var/www/clients/client3/web5/private/cron.log 2>>/var/www/clients/client3/web5/private/cron_error.log
     
  11. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Do you see entries in /var/log/syslog running that every 5 minutes? If not, maybe your cron service is disabled? If so, what shows up in the 3 log files?
     

Share This Page