# How do I find my compute engine path and how to set up the cron for a Mautic instance?

**URL:** <https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355>\
**Category:** Product Support\
**Created:** [September 30, 2020, 10:00am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355 "2020-09-30T10:00:46Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![xuzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xuzo/32/3396_2.png) [@xuzo](https://forum.mautic.org/u/xuzo)\
**Post date:** [September 30, 2020, 10:00am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/1 "2020-09-30T10:00:46Z")

</div>

**Your software**  
My Mautic version is: 3.02  
My PHP version is: 723

**Your problem**  
I want to set cron jobs for my Mautic install, but I don’t know what path to use …

Mautic install is over here:

[http://35.233.141.211/s/login](http://35.233.141.211/s/login)

I don’t know where the cron file is located, and I don’t know the path to use inside the cron file commands.

Cron command for mautic looks like this on Bitnami mautic cloud instance:

1 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/app/console mautic:segments:update

And mautic documentation says path like this:

php /path/to/mautic/bin/console mautic:campaigns:update

So to summarize

1.What is the path to my mautic installation  
2.In what file should I put the cron code or where should I create a new file?  
3.What path should I enter into the mautic cron job command

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [September 30, 2020, 10:43am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/2 "2020-09-30T10:43:14Z")

</div>

bitnami is a package application manager, so, it took care of the installation and stored it in /opt/bitnami/apps/mautic/htdocs directory, which is your /path/to/mautic

The `/app/console` is wrong for mautic 3, it should be `/bin/console`, so do this:

> 1 \* \* \* \* su daemon -s /bin/sh -c “/opt/bitnami/php/bin/php -q /opt/bitnami/apps/mautic/htdocs/bin/console mautic:segments:update

> [@xuzo](#):
>
> And mautic documentation says path like this:
> 
> php /path/to/mautic/bin/console mautic:campaigns:update

That is just an example, php can be installed in a couple of places depending on the environment, and how it is installed

> [@xuzo](#):
>
> In what file should I put the cron code or where should I create a new file?

Wherever the bitnami cloud instance puts the cron code.

---

<div class="post-metadata">

**Author:** ![xuzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xuzo/32/3396_2.png) [@xuzo](https://forum.mautic.org/u/xuzo)\
**Post date:** [September 30, 2020, 11:00am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/3 "2020-09-30T11:00:46Z")

</div>

Thanks, but actually I didn’t use Bitnami version, because there is a bug with it now, since mid september, can’t use email builder…

So I used Google deploy, I was able to get in with filezilla, here is some info, maybe you can tell what path I should input in there?

First command to run is:

**gcloud beta compute ssh --zone “us-west1-a” “mautic-google-deploy-vm” --project "horizon-private-charters"**

Then it takes me to here:

**root@mautic-google-deploy-vm:~#**

Filezilla says the console file is here (I think…)

**/var/www/html/mautic/bin**

Here are images:

 ![2020-09-30 17_49_43-KeyNote NF 1.7.9 Beta 9 Test.2 - Content.knt](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/5a87cb71b5d33c35ddfd3a3453405aa406e12573.png) ![2020-09-30 17_43_44-Mautic Community](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/8/8320ea64538736ecda49ab8c0557757fa6f5beb2.png)

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [September 30, 2020, 11:29am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/4 "2020-09-30T11:29:37Z")

</div>

Oh, I see, your directory is here

> /var/www/html/mautic/

So, you do something like this in the crontab:

php /var/www/html/mautic/bin/console mautic:campaigns:update

---

<div class="post-metadata">

**Author:** ![xuzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xuzo/32/3396_2.png) [@xuzo](https://forum.mautic.org/u/xuzo)\
**Post date:** [October 1, 2020, 1:32am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/5 "2020-10-01T01:32:52Z")

</div>

Thanks, almost there…but still confused, not sure what exact code to put in there…

**Siteground hosting:**  
`15 * * * * /usr/local/bin/php /home/vuxi5632/public_html/brunovincent.net/mautic_yh/bin/console mautic:campaigns:update >/dev/null 2>&1`

**Bitnami Documentation**  
`15 * * * * su daemon -s /bin/sh -c "installdir/php/bin/php installdir/apps/mautic/htdocs/app/console mautic:segments:update --env=prod"`

**Mautic forum post suggestion:**  
`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`

**Google Cloud:**  
Not sure, but I have these 3 bits of information:

I ran this command in command prompt:  
`~# grep -i 'DocumentRoot' /etc/apache2/sites-available/000-default.conf`

And I got this:  
`/var/www/html/mautic`

My IP address is this:  
`http://35.233.141.211/s/dashboard`

My Google cloud sign in comand is this:  
`gcloud beta compute ssh --zone "us-west1-a" "mautic-google-deploy-vm" --project "horizon-private-charters"`

Command prompt path on my windows PC:  
root@mautic-google-deploy-vm:~#

What is the **EXACT** code in need to input into the file?

I tried this:

```
0,15,30,45 /usr/local/bin/php /var/www/html/mautic/bin/console mautic:segments:update >/dev/null 2>&1
5,20,35,50 /usr/local/bin/php /var/www/html/mautic/bin/console mautic:campaigns:update >/dev/null 2>&1
10,25,40,55 /usr/local/bin/php /var/www/html/mautic/bin/console mautic:campaigns:trigger >/dev/null 2>&1
1,2,3,4,5,6,7,8,9,10,59 /usr/local/bin/php /var/www/html/mautic/bin/console mautic:emails:send >/dev/null 2>&1

```

But I get this error:

```
"/tmp/crontab.UHFBk0/crontab":23: bad hour
errors in crontab file, can't install.
```

---

<div class="post-metadata">

**Author:** ![devsrealm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/devsrealm/32/3669_2.png) [@devsrealm](https://forum.mautic.org/u/devsrealm)\
**Post date:** [October 1, 2020, 4:44am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/6 "2020-10-01T04:44:30Z")

</div>

What editor are you using to edit the crontab?

---

<div class="post-metadata">

**Author:** ![xuzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xuzo/32/3396_2.png) [@xuzo](https://forum.mautic.org/u/xuzo)\
**Post date:** [October 1, 2020, 5:06am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/7 "2020-10-01T05:06:27Z")

</div>

Nano, been fighting with this for days, stackoverflow, facebook forums, name it…(

I’m getting discouraged…

you seem like you know what you are doing, can i give you my google cloud username and password, then you can login and find the path?

Even google Suite support can’t help me…!

---

<div class="post-metadata">

**Author:** ![andersonda](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andersonda/32/627_2.png) [@andersonda](https://forum.mautic.org/u/andersonda)\
**Post date:** [October 1, 2020, 6:30am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/8 "2020-10-01T06:30:35Z")

</div>

php /home/domain.com/public\_html/bin/console mautic:iplookup:download \> /dev/null 2\>&1 is what my path looks like

do you have just ssh acces or do you have a control panel installed?

---

<div class="post-metadata">

**Author:** ![xuzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xuzo/32/3396_2.png) [@xuzo](https://forum.mautic.org/u/xuzo)\
**Post date:** [October 1, 2020, 10:00am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/9 "2020-10-01T10:00:55Z")

</div>

This is on Google cloud computer engine, not as simple as a plain website on a server…;(

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [October 1, 2020, 11:02am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/10 "2020-10-01T11:02:12Z")

</div>

Why don’t you get a good webserver for $10-$20 / month by linode for example?  
You’ll save a bunch of headache for yourself.

---

<div class="post-metadata">

**Author:** ![xuzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/xuzo/32/3396_2.png) [@xuzo](https://forum.mautic.org/u/xuzo)\
**Post date:** [October 1, 2020, 11:18am UTC](https://forum.mautic.org/t/how-do-i-find-my-compute-engine-path-and-how-to-set-up-the-cron-for-a-mautic-instance/16355/11 "2020-10-01T11:18:57Z")

</div>

I might very well just do that!

But I got it figured out now _devsrealm_ **was right as usual** , I just had the syntax wrong, for others out there, the Google Cloud console path is actually very simple, not like the Bitnami one…

this worked:

`36,38,39,44,45 * * * * php /var/www/html/mautic/bin/console mautic:emails:send >/dev/null 2>&1`

**[SOLVED] by devsrealm**
