I have been trying to set up my cron jobs and can’t manage to do so. I also can not figure how to trigger commands manually just to make sure my cron path would be correct.
By looking around, I found that this line should be triggering the sending of emails correctly:
However, I am getting hit with some errors that I can not solve alone.
PHP Warning: fopen(/opt/bitnami/mautic/var/cache/prod/../run/sf.mautic-emails-send.f8887da39a17dfb1ee96a61884260c394951b7a56925ffc98f03399e9f5028fa.lock): failed to open stream: Permission denied in /opt/bitnami/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 151
PHP Warning: flock() expects parameter 1 to be resource, bool given in /opt/bitnami/mautic/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 152
Failed to lock /opt/bitnami/mautic/var/cache/prod/../run/sf.mautic-emails-send.f8887da39a17dfb1ee96a61884260c394951b7a56925ffc98f03399e9f5028fa.lock.
Script in progress. Can force execution by using --bypass-locking.
No logs are being registered in Mautic itself
These are the commands variations that I have tried as it looked like maybe a permission issue:
Hi, it means your system is stuck with sending.
The script is running in the background and the sending doesn’t happen.
This can be caused when you are running sending commands without waiting the previous one to finish.
There are many ways to investigate this based on your skill level, but restarting the server might be the simpliest.
The email send will resume once the crons kick in again, but the problem is not solved.
Joey
Do you wonder what happens after 5 minutes and your cron is not finished with 2800 emails? I think you start to have problems. I would limit the emails sent by the cron in a way that it can do it’s job.
You can use one of these commands also for limits:
–message-limit[=MESSAGE-LIMIT]
Limit number of messages sent at a time. Defaults to value set in config.
–time-limit[=TIME-LIMIT]
Limit the number of seconds per batch. Defaults to value set in config.