• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved PhpList cron not working after move to new server

TomP

Basic Pleskian
I'm looking for a phpList user that runs crons from Plesk.

I was using phpList on my old server for many years, and used Plest cron to send the mail queue. After I just moved to my new server, phpList sends just fine, but only if I do the manual process queue. I set up the cron just as I did before to run every tem minutes:
php /usr/bin/php /var/www/vhosts/mysite.com/httpdocs/sites/mysite/lists/admin/index.php -pprocessqueue -c/var/www/vhosts/mysite.com/httpdocs/sites/mysite/lists/config/config.php

The cron runs fine with no errors, but my message queue never gets sent.

All the folder and file permissions are set correctly, and are the same as the old server that ran this perfectly.
 
A migration to a different server brings about changes to PHP versions most of the time. Have you verified that the /usr/bin/php that you use to run the job is suitable to process the commands of your script and has sufficient permissions for all that needs to get done by your script? Have you tried a different PHP version? Do you see more details in your error_log?
 
A migration to a different server brings about changes to PHP versions most of the time. Have you verified that the /usr/bin/php that you use to run the job is suitable to process the commands of your script and has sufficient permissions for all that needs to get done by your script? Have you tried a different PHP version? Do you see more details in your error_log?
I tried to add a file to act as a log to capture errors the php is throwing, but I couldn't get the permissions right, and the cron kept failing. I just sent a request to the server tech's to see if they agree on the /usr/bin/php as being correct.
 
A migration to a different server brings about changes to PHP versions most of the time. Have you verified that the /usr/bin/php that you use to run the job is suitable to process the commands of your script and has sufficient permissions for all that needs to get done by your script? Have you tried a different PHP version? Do you see more details in your error_log?
OK I found /usr/bin/php is correct. I'm also not seeing anything in the error log. I have determined that it must have something to do with the new server setup. I tried sending on one of our other sites that is still using a old copy of phpList and the same thing is going on. I did add a log file to capture any errors but it's showing nothing.
 
Last edited:
I FINALLY got the cron to work! I had added the php in front of /usr/bin/php from the advive of the server tech. After I remove it, the cron sent the mail.
 
Back
Top