Manual execution of cron tasks are working but not from crontab

Manual execution of cron-tasks are working, but not from crontab. Please suggest.
Your software
My Mautic version is: v4.2.1
My PHP version is: 7.4.29
My Database type and version is: MySQL 5.7

Output when I run segment update manually:

Rebuilding contacts for segment 4
4 total contact(s) to be added in batches of 300
 4/4 [============================] 100%
0 total contact(s) to be removed in batches of 300
4 contact(s) affected
Rebuilding contacts for segment 2
0 total contact(s) to be added in batches of 300
0 total contact(s) to be removed in batches of 300
0 contact(s) affected
Rebuilding contacts for segment 1
0 total contact(s) to be added in batches of 300
0 total contact(s) to be removed in batches of 300
0 contact(s) affected
Rebuilding contacts for segment 5
0 total contact(s) to be added in batches of 300
0 total contact(s) to be removed in batches of 300
0 contact(s) affected
Rebuilding contacts for segment 6
189465 total contact(s) to be added in batches of 300
  23987/189465 [===>------------------------]  12%


Could be an issue with your crontab

Try a different command something simple like mkdir testcrontab to see if crontab is working or not for sure.

Yes it helps cron was not working, I had fixed.

1 Like