1. Home
  2. Common issues
  3. My campaigns don’t send, they’re stuck in “Pending-Sending” status

My campaigns don’t send, they’re stuck in “Pending-Sending” status

When this happens, most likely the cron jobs that must run in order to pickup the campaigns and send them are not running, and no, it’s not something wrong with the application, but you simply need to feed the application with the right data in order to work properly.

The reason for why these cron jobs are not running might vary, might be because you haven’t added the cron jobs at all, or because you didn’t properly add them, and by this i mean:

1) the php binary, usually located at /usr/bin/php is not located there on your server.
This can be easily fixed if you have command line access and you run the command

which php

which should return the right path to the php binary. This might be something like /usr/local/bin/php instead of the traditional /usr/bin/php
Also, sometimes, the command line php is compiled with other options than the web binary, therefore if your web version of php is 5.2 this doesn’t mean the CLI version is also 5.2, it can as well be 5.0. You can test this from command line by running

/usr/bin/php -v

which will show you the php version.
If you don’t have command line access. best would be to ask your hosting about this info.

 

2) the path to the console.php file which triggers the console commands is wrong.
This can happen if you are moving the app from a server to another and you forget to update the cron jobs, but also happens if you don’t follow the last step of the installation and add the cron jobs as instructed there and you add them later.
The path to the console file should be something like: /the/absolute/path/on/your/server/to/apps/console/console.php

Other reasons:
1) You try to run more campaigns than you actually allow from settings, so go to Backend -> Settings -> Cron and put 100 in the campaigns at once field, just as a test to see if it fixes your issue. If it does, lower this number to a lower one, say 20 so that you don’t waste your server resources for nothing.

Note: Some hosting providers, especially on shared hosting, will delay your cron jobs to run at at least 15 minutes instead of, say, one minute. If this happens, then the cron job for sending campaigns for example, will be triggered once at 15 minutes thus you will get a delay while sending your campaigns. Best way would be to not use shared hosting and go with a VPS where you can control everything.

Please also see CRON JOBS list for a list of cron jobs that you have to add on your server.

Was this article helpful?

Related Articles