We have years long experience with mautic
Its important to help with a default cronjob setup. The one from the docs work, but its not optimal. I will help setting it up in a better way together with you, if you like.
For now it would be good, if the out of the box setup for cronjobs in cloudron could also be disabled. I did it by commenting out every line in the crontab.system - but will this be replaced again by an update or not? Its in the /app/data directory. So I think it will not?
I already changed my cronjob setup with a shell file. I trigger this every minute, in case its still running, it will be ignored. I will need to extend it by other optional cronjob tasks - maybe having even two or more scripts. One to run every minute (if server can handle it). And then some maintenance task that don't need to run that often.
#! /bin/sh
# Variables
phpinterpreter="php -d memory_limit=1G"
pathtoconsole="../code/bin/console"
lockfile="/tmp/cronjob.lock"
# Locking mechanism
if [ -f "$lockfile" ]; then
echo "Script is already running."
exit
fi
touch "$lockfile"
# Function to execute commands
execute_command() {
$phpinterpreter $pathtoconsole $1
}
# Execute commands
execute_command "mautic:segments:update --batch-limit=900" \
&& execute_command "mautic:campaigns:rebuild --batch-limit=300" \
&& execute_command "mautic:campaigns:trigger" \
&& execute_command "mautic:broadcasts:send --batch=800" \
&& execute_command "mautic:emails:send --message-limit=790" \
&& execute_command "mautic:unusedip:delete" \
&& execute_command "mautic:import --limit=500" \
&& execute_command "mautic:webhooks:process" \
&& execute_command "mautic:reports:scheduler"
# Unlock the script at the end
rm -f "$lockfile"
Myself I'm not a script or Linux Professional. Probably that approach can be improved.