Mautic Community Forums

Google Cloud Platform & Mautic

Hello,



Does anyone have experience on using Mautic with Google Cloud platform? I’m not too familiar with command line and would like to make some changes to the cron job timings as well as the cron jobs themselves. Would any body mind pointing me in the right direction or perhaps working with me (with pay) to help me out?



Thank you!

Hello,

Does anyone have experience on using Mautic with Google Cloud platform? I’m not too familiar with command line and would like to make some changes to the cron job timings as well as the cron jobs themselves. Would any body mind pointing me in the right direction or perhaps working with me (with pay) to help me out?

Thank you!

Okey, so I answered my own question. Sorry folks, I’m just not very good with code. I’m gonna put it here just for reference. Perhaps others will find it useful. For the record, I used the Bitnami installation on a macro instance and it works like a charm.

If you are using Google Cloud Platform, you will need to SSH into the system.

Once you’re in, you will need to switch from your user to the root account by typing:

sudo su -

Once you are the root user, you will need to access the file on the server that has the cron files. Use the following code:

sudo crontab -e

The server will ask you to chose your editor (chose the first option which is “/bin/nano”)
Make the desired changes and save your work.

There, you are done!

Hi rodfernand , Thanks for posting the “sudo su -” and “sudo crontab -e” command here, it was really helpful indeed for non tech person like me. I’ve managed to launch Mautic via Bitnami/Google Cloud, access the SSH terminal and thanks to you get to the stage where I can see the lines below :

1 * * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:segments:update” #mautic-segments-cron
1 * * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:campaigns:rebuild” #mautic-campaings-rebuild-cron
1 * * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:campaigns:trigger” #mautic-campaigns-trigger-cron
1 * * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:emails:send” #mautic-email-send-cron
1 * * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:webhooks:process” #mautic-webhooks-cron

Apologies for the newbie question but I would be really grateful if you could tell how to make the desire changes once we get to this step (I’m not tech enough but getting there). Many thanks for any additional info you can share.

Freddy

Hey @Freddyson ,

Basically from there, you have to edit the first few characters (1****…) of each cron. You can use a cron generator to generate the actual combination of characters that you need to space the crons on your servers. A good one is:

http://www.crontab-generator.org/

However, the rule here is that the first number (“1” in your case) is the “minute”. So currently, all your crons are set to run every minute on the minute. You want to create some separation between them so that they don’t all run at once. I personally like to run them 2-4 minutes apart. You want to make sure they don’t run at the same time. So in your case, it would look like this:


3 * * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:segments:update” #mautic-segments-cron
5 * * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:campaigns:rebuild” #mautic-campaings-rebuild-cron
7 * * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:campaigns:trigger” #mautic-campaigns-trigger-cron
11 * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:emails:send” #mautic-email-send-cron
13* * * * su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:webhooks:process” #mautic-webhooks-cron

Hope this helps!

Hey @rodfernand,

This definitely helps a lot ! Many thanks for taking the time to answer. Was able to update and save the rules as per your recommandation. I’m pretty sure this thread will help a lot of non tech guys wanting to beneficiate from the Google Cloud/Bitnami cloud launcher for Mautic.

Thanks again