Cron Issues on New Install from Softalicious on Siteground

Cron Issues on New Install from Softalicious on Siteground



Getting following errors when running crons from cPanel in Siteground.



Could not open input file: /public_html/market-max.com/automation/app/console



Cron synax in cPanel:php: /public_html/mydomain/automation/app/console mautic:segments:update



I have poked around the forum and have yet to see a solution for keeping crons in Siteground, which is preferable but not required. Additionally, I have installed Cronfig and am unable to get that configured as I don’t see the plugin option listed in appropriate error within the app.



I would OK with using a 3rd party, but I have yet to ready any suggestions that contain the most recent/required files.



Thanks in advance for any support that anyone could provide.



Matt



Cron Issues on New Install from Softalicious on Siteground

Getting following errors when running crons from cPanel in Siteground.

Could not open input file: /public_html/market-max.com/automation/app/console

Cron synax in cPanel:php: /public_html/mydomain/automation/app/console mautic:segments:update

I have poked around the forum and have yet to see a solution for keeping crons in Siteground, which is preferable but not required. Additionally, I have installed Cronfig and am unable to get that configured as I don’t see the plugin option listed in appropriate error within the app.

I would OK with using a 3rd party, but I have yet to ready any suggestions that contain the most recent/required files.

Thanks in advance for any support that anyone could provide.

Matt

Good day…

If anyone had any insight they could share on this matter, it would be greatly appreciated.

Matt

Hi Matt,

I have Mautic setup successfully on Siteground shared hosting. I’m on the middle package, I believe. The cron jobs I setup are based on Mautic’s recommended times for the required cron jobs here: https://mautic.org/docs/en/setup/cron_jobs.html

It looks like your main issue is finding the path to php. On my Siteground shared server, it’s “/usr/local/bin/php” as seen in the cron jobs below.

If you have SSH access, you can find the path to PHP by running this command: which php

In the locations below, change “your_cpanel_username” and “your_location_of_mautic”. It look like you have Mautic installed in public_html, so your_location_of_mautic would be “public_html/your_domain”.

Output Options: I’m in development mode. So, the cron jobs are set to append output to the file with dynamic date. If you don’t want to create one log file file per day, change the output for your needs.

My Current Cron Jobs

0,15,30,45 * * * *
/usr/local/bin/php /home/your_cpanel_username/your_location_of_mautic/app/console mautic:segments:update >> /home/your_cpanel_username/your_location_of_mautic/cron_jobs_date +%Y-%m-%d.log 2>&1

5,20,35,50 * * * *
/usr/local/bin/php /home/your_cpanel_username/your_location_of_mautic/app/console mautic:campaigns:rebuild >> /home/your_cpanel_username/your_location_of_mautic/cron_jobs_date +%Y-%m-%d.log 2>&1

10,25,40,55 * * * *
/usr/local/bin/php /home/your_cpanel_username/your_location_of_mautic/app/console mautic:campaigns:trigger >> /home/your_cpanel_username/your_location_of_mautic/cron_jobs_date +%Y-%m-%d.log 2>&1

*/5 * * * *
/usr/local/bin/php /home/your_cpanel_username/your_location_of_mautic/app/console mautic:emails:send >> /home/your_cpanel_username/your_location_of_mautic/cron_jobs_date +%Y-%m-%d.log 2>&1

0 * * * *
/usr/local/bin/php /home/your_cpanel_username/your_location_of_mautic/app/console mautic:webhooks:process >> /home/your_cpanel_username/your_location_of_mautic/cron_jobs_date +%Y-%m-%d.log 2>&1

0 * * * *
/usr/local/bin/php /home/your_cpanel_username/your_location_of_mautic/app/console mautic:social:monitoring >> /home/your_cpanel_username/your_location_of_mautic/cron_jobs_date +%Y-%m-%d.log 2>&1

0 0 * * *
/usr/local/bin/php /home/your_cpanel_username/your_location_of_mautic/app/console mautic:email:fetch >> /home/your_cpanel_username/your_location_of_mautic/cron_jobs_date +%Y-%m-%d.log 2>&1

0 0 * * 2
/usr/local/bin/php /home/your_cpanel_username/your_location_of_mautic/app/console mautic:iplookup:download >> /home/your_cpanel_username/your_location_of_mautic/cron_jobs_date +%Y-%m-%d.log 2>&1

One other note about Siteground or other shared hosting is to configure email to use SMTP. PHP Mail and Sendmail didn’t work for me. I’d setup an account in cPanel and use their SSL settings. After development, you could move to another service like Mandrill, Amazon SES or Sparkpost. I find Mandrill to be easiest if you’re just starting out.

I hope this helps,
Evan

Evan,

Thanks for this. The path worked.

Now on to my next round of configuration issues. This system far from cooperative to get setup.

Much appreciated.

Matt