Mautic is a free emailing software that can be even installed to your cPanel account using the ever-popular Softaculous.

With a single click, you are ready to go right? Wrong. You still need to setup the CronJobs which can sometimes be a real pain to do properly especially if your shared hosting provider has some limitations in doing so.

The simple solution is to initiate these CronJobs outside your cPanel / Plesk with a simple script.

1. Login your cPanel / Plesk and open File Manager.
2. Create new file into Mautic’s folder named cron.php (or whatever you want to call it).
3. Copy and paste the script below to the newly created file.  Save and close.


if (!isset($_GET['MauTiCcRons'])) {
echo 'The secret phrase is wrong.';

$allowedTasks = array(
'doctrine:schema:update --dump-sql',
'doctrine:schema:update --force'

if (!isset($_GET['task'])) {
echo 'Specify what task to run. You can run these:';
foreach ($allowedTasks as $task) {
$href = $link . '&task=' . urlencode($task);
echo '<br><a href="' . $href . '">' . $href . '</a>';
echo '<br><a href="">Read more</a>';
echo '<br><b style="color:red">Please, backup your database before executing the doctrine commands!</b>';

$task = urldecode($_GET['task']);

if (!in_array($task, $allowedTasks)) {
echo 'Task ' . $task . ' is not allowed.';

$fullCommand = explode(' ', $task);
$command = $fullCommand[0];

$argsCount = count($fullCommand) - 1;
$args = array('console', $command);

if ($argsCount) {
for ($i = 1; $i <= $argsCount; $i++) {
$args[] = $fullCommand[$i];

require_once __DIR__.'/app/bootstrap.php.cache';
require_once __DIR__.'/app/AppKernel.php';
use SymfonyBundleFrameworkBundleConsoleApplication;
use SymfonyComponentConsoleInputArgvInput;
use SymfonyComponentConsoleOutputBufferedOutput;

defined('IN_MAUTIC_CONSOLE') or define('IN_MAUTIC_CONSOLE', 1);

try {
$input = new ArgvInput($args);
$output = new BufferedOutput();
$kernel = new AppKernel('prod', false);
$app = new Application($kernel);
$result = $app->run($input, $output);
echo "<pre>n".$output->fetch().'</pre>';
} catch (Exception $exception) {
echo $exception->getMessage();

4. Go to and keep this tab open.
5. Sign up at: .
6. Use the link at step 4. to create new ones and add them to the 1<campaigns%3Aupdate<campaigns%3Atrigger>mail%3Aprocess

Now Cronjobs will be run by via the php script above, so any Cronjob limitations your hosting provider might throw at you are bypassed.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.