cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 cron - Server, Admin and Module Configuration Advice Needed

Magento 2 cron - Server, Admin and Module Configuration Advice Needed

Hi all - How are the configurations of the following connected please?

1. Shared cloud hosting - server cron settings

2. Magento 2 Admin - cron settings

3. Third party extensions (modules) cron settings

Could someone please explain how the above work together?

-1. Server cron runs once a day (03:30) This runs the command:

/usr/local/php71/bin/php-cli /home/username/www/hostname.com/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/username/www/hostname.com/public_html/var/log/magento.cron.log

-2. Cron options for the following 'groups'

Generate Schedules Every, Schedule Ahead for, Missed if Not Run Within, History Cleanup Every, Success History Lifetime, Failure History Lifetime, Use Separate Process

What does all of this mean? I can't find any detailed explanation.

- 3. All of the different crontab files have their own schedule times in the code.

 

The main problem I'm experiencing is that not all third party crons are added to the database cron_schedule table. Some have many duplicates, some state missed and some just aren't added.

I need a full detailed explanation of how all of these configuration settings work together.
For example, If a third party module has a crontab.xml that schedules a job once a day at 10:00am every day and my Server cron is set to run at 03:30am how does this affect the Magento Admin cron settings?? - Generate Schedules Every 15, Schedule Ahead for 1, Missed if Not Run Within 15, etc...

It's so confusing.

Any advise/help would be very much appreciated.

Apologies for the long post

Andy

 

 

 

2 REPLIES 2

Re: Magento 2 cron - Server, Admin and Module Configuration Advice Needed

Just to add to my OP, the reason form my need to completely understand how all of these work together is that some cron job clean up the database and because some cron's aren't being added to the schedule, some database tables are having to be Truncated manually.

Thanks Again

Andy

Re: Magento 2 cron - Server, Admin and Module Configuration Advice Needed

It seems that cron and Magento are a complete mystery to all of us.

Windows server was so much easier to set schedule tasks....

Guess I'll have to keep searching.

 

Cheers