Hi @marcos,
Thank you for the reply. Running the command you mentioned gave the below message -
The user daemon cannot use this program (crontab)
I then ran sudo crontab -l
and got the following results -
1 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:segments:update" #mautic-segments-cron
1 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:campaigns:rebuild" #mautic-campaings-rebuild-cron
1 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:campaigns:trigger" #mautic-campaigns-trigger-cron
1 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:emails:send" #mautic-email-send-cron
1 * * * * su daemon -s /bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:webhooks:process" #mautic-webhooks-cron
I assume that the cron jobs have been setup properly on my server. The 2nd step I did was executing the below script from the shell on the server as present in cron entry -
/bin/sh -c "/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:segments:update"
and got the below output -
PHP Warning: fopen(/opt/bitnami/apps/mautic/htdocs/app/cache/prod/../script_executions.json): failed to open stream: Permission denied in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 50
PHP Warning: flock() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 52
checkRunStatus() - flock failed on /opt/bitnami/apps/mautic/htdocs/app/cache/prod/../script_executions.json - taking our chances like we used to.
PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 56
PHP Warning: ftruncate() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 80
PHP Warning: rewind() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 81
PHP Warning: fputs() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 83
PHP Warning: fflush() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 84
PHP Warning: flock() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 86
PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 87
Rebuilding contacts for segment 2
0 total contact(s) to be added in batches of 300
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
total contact(s) to be removed in batches of 300
0 contact(s) affected
PHP Warning: fopen(/opt/bitnami/apps/mautic/htdocs/app/cache/prod/../script_executions.json): failed to open stream: Permission denied in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 97
PHP Warning: flock() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 99
PHP Warning: fgets() expects parameter 1 to be resource, boolean given in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 101
PHP Fatal error: Call to undefined method Mautic\LeadBundle\Command\UpdateLeadListsCommand::writeln() in /opt/bitnami/apps/mautic/htdocs/app/bundles/CoreBundle/Command/ModeratedCommand.php on line 103
[Symfony\Component\Debug\Exception\UndefinedMethodException]
Attempted to call an undefined method named "writeln" of class "Mautic\LeadBundle\Command\UpdateLeadListsCommand".
mautic:segments:update [-b|--batch-limit [BATCH-LIMIT]] [-m|--max-contacts [MAX-CONTACTS]] [-i|--list-id [LIST-ID]] [-f|--force] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] <command>
I see few warnings, few messages and few exceptions. I am sure, there is something wrong going on with the cron jobs. Please help me in getting this up and running. I am newbie to this and please bear with me for my limited knowledge.
Looking forward to your response.
Regards,
Nitesh