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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Mautic cron settings

    Mautic
    mautic
    4
    10
    478
    Loading More Posts
    • 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.
    • micmc
      micmc last edited by girish

      Hey folks,

      Anyone is aware of what's the deal with the setting of cron job for the Mautic app?

      When I try to enter crontab -e on the terminal I'm getting the error command not found message. Huh?

      Then, I noticed there's this button at the top "Sheduler/cron". How cool, but how does it work!?

      Clicking the button we see a dropdown menu with a fair large list of choices of attributes, all right then what?

      When I click, let's say "mautic_campaigns_trigger" for example, there's a command that posts itself to the command line like, in this case; # sudo -u www-data --preserve-env php /app/code/app/console mautic:campaigns:trigger without return carriage. That's it!

      Now what? Is this scheduled? Is that all? Do I need to press enter? (pressing it seems to do nothing more) Do I need to click each of the attributes from the dropdown one after another in order to complete the cron scheduling required to run mautic??

      Cloudron's mautic doc is empty, and seacrh on this forum was not relevant and of no help at all.

      Regards,
      Andy


      https://marketingtechnology.agency
      For cutting edge web technologies

      1 Reply Last reply Reply Quote 0
      • girish
        girish Staff last edited by

        @micmc Mautic is already pre-configure with the cron jobs. See https://git.cloudron.io/cloudron/mautic-app/blob/master/CloudronManifest.json#L16 . The 'cron' button in the terminal is intended to help you run any of the tasks listed in the manifest "immediately" at that instant. Otherwise, they will run automatically based on the schedule pattern in the manifest.

        For your case, the trigger pattern is below:

              "mautic_campaigns_trigger": {
                "schedule": "2,17,32,47 * * * *",
                "command": "sudo -u www-data --preserve-env php /app/code/app/console mautic:campaigns:trigger"
              },
        
        micmc 1 Reply Last reply Reply Quote 1
        • micmc
          micmc @girish last edited by

          @girish WOW that's fantastic! And for someone used to set crontab from cli that's too easy, once we know it... lol 🙂

          Left to add this info to the docs.

          Cheers mate.
          Andy


          https://marketingtechnology.agency
          For cutting edge web technologies

          1 Reply Last reply Reply Quote 0
          • Grienauer
            Grienauer last edited by

            @girish can you check if the crons are still configured?
            I can't see any in the actual https://git.cloudron.io/cloudron/mautic-app/blob/master/CloudronManifest.json you mentioned and also can't find any button in the terminal…
            maybe that got lost with the move to mautic 3?
            thx!

            Drupal CMS and Open Source Expert, Mautic Community lead Secretary

            girish 1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @Grienauer last edited by

              @grienauer Ah right, we changed the cron setup of mautic entirely since this post. You can run it as explained here - https://docs.cloudron.io/apps/mautic/#system-cron-jobs

              1 Reply Last reply Reply Quote 0
              • Grienauer
                Grienauer last edited by

                @girish thx! what about the cron button mentioned in the post (which should be available in the terminal) would be great to have that again 🙂

                Drupal CMS and Open Source Expert, Mautic Community lead Secretary

                1 Reply Last reply Reply Quote 0
                • Aizat
                  Aizat last edited by

                  Hi, I'm a little late to the party; I'm about to use Mautic for the first time. I checked their documentation, and they advised to set up the cron to ensure Mautic works appropriately.
                  I have a few questions regarding the cron:

                  1. Do I need to add any cronjob in the Cloudron crontab? Or Cloudron has the app pre-configured to run at specific times for "segment, campaign updates", etc

                  2. Do I need to add the cron mentioned here manually: https://docs.mautic.org/en/setup/cron-jobs/

                  According to:
                  https://docs.cloudron.io/apps/mautic/

                  1. I assume I can change/overwrite the cronjob on how often, for example: "mautic:segments:update" works, by adding the instance I need in the Cloudron cron section, am I right?

                  Thanks in advance for the tips!

                  girish 1 Reply Last reply Reply Quote 0
                  • girish
                    girish Staff @Aizat last edited by girish

                    @Aizat

                    1. The "standard" cron jobs i.e listed in https://docs.mautic.org/en/setup/cron-jobs are already configured. See /app/data/crontab.system , it contains the system (i.e "standard") cron jobs. You can edit the cron times there if you want things to run more/less frequently. Don't remove items from that file.

                    2. https://docs.mautic.org/en/setup/cron-jobs are already setup as mentioned above.

                    3. mautic:segments:update is one of the standard cron tasks, so you don't need to add that in the app's cron manually.

                    Thumbrule is:

                    • See first if it's in /app/data/crontab.system . If it's there, it's because it's part of mautic core and a standard cron job. You can customize the interval in the file directly and then restart the app.

                    • If you want to add some custom cron job , like for some custom data processing or some for some plugin or something else, add it in app's cron manually.

                    Aizat 1 Reply Last reply Reply Quote 1
                    • Aizat
                      Aizat @girish last edited by

                      @girish Thank you so much.
                      Regarding the sending email, I've set up Cloudron to send emails via relay with Amazon SES. Therefore, when I set the email in Mautic, I can use a domain email I've set up in Cloudron as a relay to send via Amazon SES. Do I get it correct?

                      girish 1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff @Aizat last edited by

                        @Aizat Yes, that should work.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB