Difficulty creating a Cron Job in CPanel


Please, tell me how to setup cron job into cpanel. I mean, the exact command line.

The exact command line varies based on details of where your installed your phpList.
You will need to know the full file system path to your “lists” directory.

Read more about it here:

1 Like

Thanks for replying.

I saw that article but I cannot do it.
I´ve used this command but it does not work (CPanel):

/usr/bin/php /home/mailseila/public_html/lists/admin/index.php -pprocessqueue -c/home/mailseila/public_html/lists/config/config.php

The queue still there…

Thanks for the update. I’d probably conclude that the directories might not match the actual directory structure on your machine. At this point, you can ask your system administrator/tech support for the exact command for your machine.

Actually, are the right directories.

here is an example of the command that works on my machine… you might want to put a space after the -p or -c

/usr/bin/php -q /var/www/html/lists/admin/index.php -p processqueue -c /var/www/html/lists/config/config.php

You if your directories are correct, it something should be happening.
You can also try using the ‘php-cli’ command… for example:

/usr/bin/php-cli -q /var/www/html/lists/admin/index.php -p processqueue -c /var/www/html/lists/config/config.php

Lastly, make sure your path to php is correct.

1 Like

Thanks Dan, it’s working now !

I found two errors in my command line: missed “php-cli” and “-p (space) processqueue”

(/usr/bin/php /var/www/html/lists/admin/index.php -pprocessqueue…)

That’s it.

Thanks again,

1 Like

Ok, glad you got it going!

1 Like

Please check out https://www.easycron.com/cron-job-tutorials/how-to-set-up-cron-job-for-phplist. I found it very easy to set up. It supports multiple configurations.

1 Like

The other thing to try is the new Remote Queue Processing option by phplist.com (https://www.phplist.org/manual/ch035_methods-of-sending-browser-cron-command-line.xhtml described in this chapter)

Essentially your mails are processed by the phplist.com cron so you don’t need your own. The service is free atm.

Let me know if it works :slight_smile:

1 Like

I want to configure PhpList with Cron in hostgastor, someone can help me?

in my phplist i have this code

/usr/bin/php -q/home2/souhaile/public_html/world/admin/index.php -p processqueue -c/home2/souhaile/public_html/world/config/config.php $*

but i get this email from Cron Daemon:

/bin/sh: -c: line 0: syntax error near unexpected token newline' /bin/sh: -c: line 0:phplist -pprocessqueue >’

I also tested this code in my fils : i deleted " $* "

/usr/bin/php -q/home2/souhaile/public_html/world/admin/index.php -p processqueue -c/home2/souhaile/public_html/world/config/config.php 

but I still have the same problem !!

and i
someone can help me?
thank you