team
September 12, 2023, 11:53pm
1
EasyApache 4
**My Mautic version is: 4.4.10
My PHP 80, PHP 8.0.29-1.1.3.cpanel
extention: php80-php-fileinfo
cPanel & WHM on AlmaLinux
OS: AlmaLinux v8.8.0 STANDARD kvm
cPanel Version 112.0.5
Hi, everyone,
Are we optimizing the best Cron Job configurations as follows:
5min
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/app/console mautic:segments:update
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/app/console mautic:campaigns:update
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/app/console mautic:campaigns:trigger
5min
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/app/console mautic:emails:send
twice a month
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/app/console mautic:iplookup:download
Regards,
Hal
it should be /bin/console
2 Likes
ayayron
September 13, 2023, 7:13pm
3
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segments:update
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:update
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:trigger
5min
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:emails:send
twice a month
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:iplookup:download
There are 15 cron jobs that make Mautic run well and all should look similar.
1 Like
team
September 13, 2023, 8:59pm
4
Ayayron,
What is a source listing of the 15 Cron Jobs?
Regards,
Hal
ayayron
September 14, 2023, 12:58pm
5
Remember only replace the app with bin for it to work correctly like the above cron jobs show.
# Cron Jobs #
Mautic requires a few [cron jobs](https://en.wikipedia.org/wiki/Cron) to handle some maintenance tasks. Most web hosts provide a means to add cron jobs either through SSH, cPanel, or another custom panel. Please consult your host's documentation/support if you are unsure on how to setup cron jobs.
If you're new to Linux or Cron Jobs, then the Apache Foundation have [an excellent guide](https://www.howtoforge.com/a-short-introduction-to-cron-jobs) which we would suggest that you read before asking questions via the various support channels.
How frequently you run the cron jobs is up to you. Many shared hosts prefer that you run scripts every 15 or 30 minutes and may even override the scheduled times to meet these restrictions. Consult your host's documentation if they have such a restriction.
**It is HIGHLY recommended that you stagger the following required jobs so as to not run the exact same minute.**
For instance:
- 0,15,30,45 <— mautic:segments:update
- 5,20,35,50 <— mautic:campaigns:update
- 10,25,40,55 <— mautic:campaigns:trigger
## Required ##
### Segments ###
**To keep the segments current:**
This file has been truncated. show original
This is on Mautic itself.
team
September 14, 2023, 2:25pm
6
Hi everyone,
Revised Cron Job:
CLI
/usr/local/bin/php --version
5min
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:segments:update
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:update
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:campaigns:trigger
5min
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:emails:send
twice a month
/usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:iplookup:download
See the screenshot images for details:
The only Con Job exception is
[root@35-236-118-198 ~]# /usr/local/bin/php /home/mautic/public_html/mautic.devced.com/bin/console mautic:iplookup:download
Automatically fetching IP lookup data failed.
Error message:
MaxMind messages read: “Databases must be downloaded and periodically updated”
Question: How do I download and periodically update?
Regards,
Hal
system
Closed
September 16, 2023, 2:25am
7
This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.