cron not working even when started manually

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • boris
    Member
    • Apr 2019
    • 39

    #1

    cron not working even when started manually

    Today I realized, the planed jobs didn't run for quite a time. I can't figure out what has changed to cause this, perhaps an update? The cron worked for years without any problems. The Espo-installation is version 9.3.4 and runs on a windows server.

    What I tried:
    • Deleting the scheduled task and creating a new one
    • Tried to start the cron.php manually
    • Disabled and unistalled all extensions
    • Checked the config files for disabled cron
    • Did a complete new installation and imported the old content with this steps by step guide: https://forum.espocrm.com/forum/inst...1187#post61187

    Set the logging to debug level during my tests. Every start of cron causes the following lines:
    Click image for larger version  Name:	logespo.jpg Views:	0 Size:	61.4 KB ID:	126129

    from my point of view nothing relevant.

    Any ideas how to find out what happend or how to fix this issue?

    Many thanks

    Boris
    Last edited by boris; 04-23-2026, 09:34 PM.
  • heint
    Member
    • Jun 2025
    • 85

    #2
    Greetings, boris,

    Do you know if this problem covers only this exact instance or fresh Espo installation handles cron jobs as usual?
    And what PHP version are you using right now on the server? Also recommended to check user permissions for the important Espo folders, since they might have been changed after a major update on Windows.

    Comment

    • shalmaxb
      Senior Member
      • Mar 2015
      • 1876

      #3
      could you post the log file as text?

      Comment

      • yuri
        EspoCRM product developer
        • Mar 2014
        • 9834

        #4
        These are not errors. You have enabled sql logging. You need to disable it.

        Comment

        • boris
          Member
          • Apr 2019
          • 39

          #5
          Sorry for the late answer:
          The SQL-Log was only enabled to show some content in the logfile. I disabled it now. Log settings are this:

          'language' => 'de_DE',
          'logger' => [
          'path' => 'data/logs/espo.log',
          'level' => 'DEBUG',
          'rotation' => true,
          'maxFileNumber' => 30

          After starting cron manually ("C:\xampp\php\php.exe" -f index.php -- cron and via .bat-file with content from the ESPO backend) no job is created in the backend:

          Click image for larger version

Name:	grafik.png
Views:	0
Size:	102.0 KB
ID:	126412​
          and the log-file is empty. Or better shows no relevant content:



          [2026-05-19 00:46:58] DEBUG: Schema\Builder - Start
          [2026-05-19 00:46:58] DEBUG: Schema\Builder: Entity ActionHistoryRecord
          [2026-05-19 00:46:58] DEBUG: Schema\Builder: Entity AddressCountry
          [2026-05-19 00:46:58] DEBUG: Schema\Builder: Entity AppLogRecord
          ...
          [2026-05-19 00:46:58] DEBUG: Schema\Builder: ManyMany for TargetList.syncWithReports
          [2026-05-19 00:46:58] DEBUG: Schema\Builder - End​

          Any idea how to proceed?

          Comment

          • victor
            Active Community Member
            • Aug 2022
            • 1192

            #6
            Regarding EspoCRM Scheduled Jobs for XAMPP, all the necessary steps are described and shown at the link:


            I haven't used XAMPP for almost 2 years. However, I started Apache and MySQL on it and manually ran the EspoCRM_Scheduled_Job.bat file (I didn't want to wait for it to run once a day) and everything worked for me. Before launching, the last successfully executed Scheduled Job was executed back in 2024. However, after launching, everything works as it should.

            Click image for larger version

Name:	image.png
Views:	0
Size:	162.2 KB
ID:	126429​

            Comment

            • boris
              Member
              • Apr 2019
              • 39

              #7
              Hi Victor,
              thanks for your answer, but I don't doubt that scheduled jobs are not working. As written: Everything worked until (perhaps) the last update, which I have done like written in the first post.
              The scheduled job is setup correct, no errors in the windows log. The .bat file has the right content. Problem is nothing happens and no log in ESPO where I can drill down the issue.

              So the question is how to trace step by step what the cron.php does (or better does not), when there is no help from a log-file...

              Comment

              • victor
                Active Community Member
                • Aug 2022
                • 1192

                #8
                Most likely the problem is with the php version. EspoCRM v9.3+ stopped using php8.2, so your XAMPP should have either php8.3, or php8.4, or php8.5. So check the php version in Administration > System Requirements.

                Comment

                • boris
                  Member
                  • Apr 2019
                  • 39

                  #9
                  Hi Victor, ESPO works like it should only the cron is missing. PHP is 8.4.15...

                  Comment

                  • victor
                    Active Community Member
                    • Aug 2022
                    • 1192

                    #10
                    In this case, on Windows, run CMD and there run the command written in your EspoCRM_Scheduled_Job.bat file (MySQL and Apache must be running during this). In my case it is:

                    Code:
                    "C:\xampp\php\\php.EXE" -f C:\xampp\htdocs\espocrm1\cron.php
                    If the error is with Cron, then there should be some information about it in CMD, or it should start correctly.

                    Comment

                    • boris
                      Member
                      • Apr 2019
                      • 39

                      #11
                      Hi Victor, I already started the cron manually. Like I wrote in my first post I already tried
                      • Deleting the scheduled task and creating a new one
                      • Tried to start the cron.php manually
                      • Disabled and unistalled all extensions
                      • Checked the config files for disabled cron
                      • Did a complete new installation and imported the old content with this steps by step guide: https://forum.espocrm.com/forum/inst...1187#post61187
                      The problem is: No errors here, nothing in the logs even win taskscheduler claims job started and ended without errors.

                      Comment

                      • victor
                        Active Community Member
                        • Aug 2022
                        • 1192

                        #12
                        It's not clear whether you're using XAMPP or Windows server. If XAMPP, what version is it and what version of Windows are you running?
                        If again, you are using XAMPP, have you watched the step-by-step video on its configuration? It is as correct and informative as possible, and I personally configured XAMPP using it.

                        Comment

                        Working...