Keywords: WordPress - AWS - Technical issue - Other
bnsupport ID: 0c4f9f3e-c22d-6c10-9df9-986502e76690
Description:
Hi there,
I enabled “Enable Server Scheduler” and with crontab -e I added a 15 mins cron like this:
*/15 * * * * su daemon -s /bin/sh -c "cd /opt/bitnami/apps/wordpress/htdocs/; /opt/bitnami/php/bin/php -q wp-cron.php"
If I then check the log with grep "wp-cron.php" /var/log/syslog I see the cron is running:
...
Jan 11 20:30:01 ip-172-26-6-113 CRON[27778]: (bitnami) CMD (su daemon -s /bin/sh -c "cd /opt/bitnami/apps/wordpress/htdocs/; /opt/bitnami/php/bin/php -q wp-cron.php")
Jan 11 20:45:01 ip-172-26-6-113 CRON[27887]: (bitnami) CMD (su daemon -s /bin/sh -c "cd /opt/bitnami/apps/wordpress/htdocs/; /opt/bitnami/php/bin/php -q wp-cron.php")
Jan 11 21:00:01 ip-172-26-6-113 CRON[28056]: (bitnami) CMD (su daemon -s /bin/sh -c "cd /opt/bitnami/apps/wordpress/htdocs/; /opt/bitnami/php/bin/php -q wp-cron.php")
Jan 11 21:15:01 ip-172-26-6-113 CRON[28164]: (bitnami) CMD (su daemon -s /bin/sh -c "cd /opt/bitnami/apps/wordpress/htdocs/; /opt/bitnami/php/bin/php -q wp-cron.php")
...
However… all jobs at the /wp-admin/tools.php?page=advanced-cron-manager are halted in “In queue”.
Finally, if I do sudo su and then I execute
su daemon -s /bin/sh -c "cd /opt/bitnami/apps/wordpress/htdocs/; /opt/bitnami/php/bin/php -q wp-cron.php"
Then all jobs are run and wordpress see them as run.
Any idea what could be going on?
Thanks