Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Managed)
  3. How to increase cron interval in WP-unmanaged app?

How to increase cron interval in WP-unmanaged app?

Scheduled Pinned Locked Moved Solved WordPress (Managed)
wordpress
15 Posts 4 Posters 2.7k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • imc67I imc67

    Hi @murgero, thanks for your quick response!

    In that folder there are only: credentials.txt php.ini /public 😞

    Kind regards,

    Marcel.

    murgeroM Offline
    murgeroM Offline
    murgero
    App Dev
    wrote on last edited by
    #4

    @imc67 You can make the file (assuming wp-unmanged is based on the LAMP app) called crontab and put what you need in there. Would be worth a test.

    --
    https://urgero.org
    ~ Professional Nerd. Freelance Programmer. ~

    1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #5

      Currently there is no way to customize the cron schedule, it is fixed in the app package manifest to every 5 minutes. What is the use-case for making this more frequent? We can change this if there are good reasons.

      imc67I 1 Reply Last reply
      0
      • nebulonN nebulon

        Currently there is no way to customize the cron schedule, it is fixed in the app package manifest to every 5 minutes. What is the use-case for making this more frequent? We can change this if there are good reasons.

        imc67I Online
        imc67I Online
        imc67
        translator
        wrote on last edited by
        #6

        @nebulon Hi Johannes, thanks for your response. In Wordpress itself there are 1 minute cron interval types and plugins are using it. Now some plugins give cron-errors like "there are 5 unfinished cron tasks, is there something wrong with your cron?".

        Kind regards,

        Marcel.

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #7

          @imc67 We will push an update so that the cron interval is configurable.

          1 Reply Last reply
          1
          • imc67I Online
            imc67I Online
            imc67
            translator
            wrote on last edited by imc67
            #8

            @girish this would be awesome!!!

            1 Reply Last reply
            0
            • imc67I Online
              imc67I Online
              imc67
              translator
              wrote on last edited by
              #9

              @girish Today there was an app update to 1.2.2 with description: Make cron granularity 1 second

              I was very curious what was changed and I discovered the cron interval is now every 2 minutes. In the app manifest (yes I've found that 😉 ) the cron is now:

              "schedule": "*/1 * * * *"

              This means every other minute (so every 120 seconds). Now I'm very curious what the update description means?

              With these 2 minutes I'm already happy, it would be a little bit better to have it every minute: "schedule": "* * * * *"

              Kind regards and keep up the good work! I'm already have some production sites in Cloudron and unmanagedWP-app and I'm very very happy with this great product!!

              Kind regards,

              Marcel

              1 Reply Last reply
              0
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #10

                @imc67 The pattern means every minute. Why do you think it means every 2 minutes? https://cronexpressiondescriptor.azurewebsites.net/?expression=*%2F1+*+*+*+*&locale=en

                Also, for code changes, you can always track https://git.cloudron.io/cloudron/wordpress-unmanaged-app

                1 Reply Last reply
                0
                • imc67I Online
                  imc67I Online
                  imc67
                  translator
                  wrote on last edited by
                  #11

                  @girish Hi, thanks for your response, the result of the "*/1 * * * *" is:

                  [2019-05-31 09:10:31] - [Cron Request]- 120.29s after the previous one. | Cron called from 127.0.0.1 (?)
                  [2019-05-31 09:08:31] - [Cron Request]- 119.87s after the previous one. | Cron called from 127.0.0.1 (?)
                  [2019-05-31 09:06:31] - [Cron Request]- 120.13s after the previous one. | Cron called from 127.0.0.1 (?)
                  [2019-05-31 09:04:31] - [Cron Request]- 119.92s after the previous one. | Cron called from 127.0.0.1 (?)
                  [2019-05-31 09:02:31] - [Cron Request]- 119.97s after the previous one. | Cron called from 127.0.0.1 (?)
                  

                  So all almost exactly 120 seconds interval.

                  As far as I know a 1 minute interval is "* * * * *" (https://crontab.guru/every-minute)

                  So it would be really great if this could be implemented 🙂

                  Kind regards,

                  Marcel.

                  1 Reply Last reply
                  0
                  • nebulonN Offline
                    nebulonN Offline
                    nebulon
                    Staff
                    wrote on last edited by
                    #12

                    Apparently both patterns are equivalent, not sure why you see those exactly two minutes apart. I did a quick test locally with the same cron module and I get for both every minute. Will do a cloudron app test later.

                    1 Reply Last reply
                    0
                    • nebulonN Offline
                      nebulonN Offline
                      nebulon
                      Staff
                      wrote on last edited by
                      #13

                      I just tested the WordPress unmanaged app regarding the currently published cron pattern and I cannot reproduce the 2 minutes interval:

                      10:44:09 - => Run cron job
                      10:44:10 - Success: Executed a total of 0 cron events.
                      10:45:09 - => Run cron job
                      10:45:10 - Success: Executed a total of 0 cron events.
                      10:46:09 - => Run cron job
                      10:46:10 - Success: Executed a total of 0 cron events.
                      

                      Not sure what the difference between our two deployments are now.

                      1 Reply Last reply
                      0
                      • imc67I Online
                        imc67I Online
                        imc67
                        translator
                        wrote on last edited by
                        #14

                        @nebulon OMG I have to apologize!

                        This log is from a plugin and that has an own 2 minute schedule 😞
                        I checked the app log and there is indeed a 1 minute cron call.

                        I'm deeply ashamed for this mistake, sorry!

                        Kind regards,

                        Marcel.

                        1 Reply Last reply
                        0
                        • nebulonN Offline
                          nebulonN Offline
                          nebulon
                          Staff
                          wrote on last edited by
                          #15

                          No worries, at least now we know what happened.

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Bookmarks
                          • Search