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!

1 Like

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!

1 Like

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

I could do the same thing with Google deploy mautic, however what is my path name to input into the cron job lists?

I can get in that file to modify it, but since it’s not bitanmi install (that one does’t work…bug…)

How can I find the path to put in there from my Google cloud compute engine, and will this work?

URL to instance is this:

http://35.233.141.211/s/login

what should I use for this part?

su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console

2020-09-30 12_56_29-Drupal Support

Actually , it doesn’t mean every minute on the minute…

Every minute on the minute is this:

* * * * *

Every hour on the first minute is this:

1 * * * *

In order to ensure inboxing, you should use a secure connection (https) for hosting your Mautic.

The mautic URL will be present in every email as tracking domain, so it should be https.

what happens if I leave it non https? Will it affect delivery rates?

I don’t need this for anything related to my websites, no forms, no visitors, nothing like that.

It’s only a sending tool for me

If you turn off tracking (no tracking image placed in your emails), thank you are okay.