SOLVED Mautic cron settings
-
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 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 -
@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
-
@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