CRON JOB not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leon.brehme
    Junior Member
    • Jan 2023
    • 6

    CRON JOB not working

    Hi there,

    ​I have a problem with the cron job. Unfortunately it does not work. No errors appear in the logs, the system itself also reports that everything is ok except that cron jobs are not executed.

    As soon as I start the job manually via e.g. “php command.php run-job Cleanup” it also works and I can see it under .../#Admin/jobs.

    Unfortunately, running the cron.php has no effect (whether via the crontab or manually via the shell). But it does run, as you can see in the system logs.

    I have moved the server from Debian to Ubuntu, since then the cron does not work, everything else works fine since the migration.

    Any suggestions and help would be appreciated.

    We are using the latest EspoCRM version.

    Thank you very much!

    Best regards, Leon
  • lazovic
    Super Moderator
    • Jan 2022
    • 814

    #2
    Hi leon.brehme,

    Please tell me where exactly your EspoCRM is hosted? On what hosting?
    Can you please take a screenshot of what the crontab looks like and what command you run to open it?

    Comment

    • leon.brehme
      Junior Member
      • Jan 2023
      • 6

      #3
      Hi,

      sure: Ubutnu 22.04. LTS, running as LCX on Proxmox 8.2
      Im running php 8.3.8

      The cron is executed by the www-data user with the command in the screenshot.

      Comment

      • leon.brehme
        Junior Member
        • Jan 2023
        • 6

        #4
        Hi lazovic,

        I wanted to ask if you have any suggestions on where to start troubleshooting this issue. I'm not sure what the problem might be.
        Thank you for your help!

        Best regards​

        Comment

        • lazovic
          Super Moderator
          • Jan 2022
          • 814

          #5
          leon.brehme,

          There may be a couple of reasons for this behavior. First, check whether the path to PHP and the path to cron script itself is set correctly.

          Comment

          • leon.brehme
            Junior Member
            • Jan 2023
            • 6

            #6
            lazovic

            The path to php is correct, same goes for the path to the cron.
            I also see syslogs for the execution of the cronjob.

            Comment

            • leon.brehme
              Junior Member
              • Jan 2023
              • 6

              #7
              The daemon itn't working either.
              I think it has something to do with the path...

              Comment

              • eymen-elkum
                Active Community Member
                • Nov 2014
                • 472

                #8
                Can you confirm if this issue happened after upgrade or after extension install / uninstall?
                CEO of Eblasoft
                EspoCRM Expert since 2014
                Full Stack Web Developer since 2008
                Creator of Numerous Successful Extensions & Projects​

                Comment

                • leon.brehme
                  Junior Member
                  • Jan 2023
                  • 6

                  #9
                  eymen-elkum
                  Hi,

                  My apologies for the delayed response. I missed your earlier message and needed to adjust my forum settings.

                  In the meantime, I was able to resolve the cron issue. It seems the "disable cron" function was inadvertently activated... No more to say.

                  Thank you everyone for your assistance!

                  Best regards,

                  Comment

                  Working...