-
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 -
@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" },
-
@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! -
@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
-
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:-
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
-
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/- 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!
-
-
-
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. -
https://docs.mautic.org/en/setup/cron-jobs are already setup as mentioned above.
-
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.
-
-
@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?