I just deployed Magento on Google Cloud platform and then getting the error.
I search the web how I can confirm cron job on Google Cloud but I was not successful.
please any help this the message I get
System messages
Solved! Go to Solution.
@osha_zarad1Are you able to connect to your Google Cloud server using SSH or do you have a CPanel for the same? Command explained above by @gelanivishal can be used on SSH command prompt to configure the crons.
You can make SSH connection using Putty software.
Let know if this help otherwise please provide more details on where you have the issue to provide more appropriate answer.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Hello @osha_zarad1 ,
To setup cronjob on server, Please follow below steps
Please log in on the server by the terminal
Find the PHP binary and php.ini path
To display the path to your PHP binary, enter
$ which php
A sample result follows:
/usr/bin/php
Create the cron job
To create a cron job for the Magento file system owner, enter the following command as a user with root privileges:
$ crontab -u <Magento file system owner username> -e
For example,
$ crontab -u magento_user -e
A text editor displays. (You might need to choose a text editor first.)
* * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <magento install dir>/var/log/magento.cron.log * * * * * <path to php binary> <magento install dir>/update/cron.php >> <magento install dir>/var/log/update.cron.log * * * * * <path to php binary> <magento install dir>/bin/magento setup:cron:run >> <magento install dir>/var/log/setup.cron.log
where
The first command (magento cron:run) reindexes indexers, sends automated e-mails, generates the sitemap, and so on. Usually, it’s associated with the PHP command line .ini file. The other two commands are used by the Component Manager and System Upgrade
--
If my answer is useful, please Accept as Solution & give Kudos
Thank you for your prompt reply.
are you able to show me how to do that on Google Cloud?
@osha_zarad1Are you able to connect to your Google Cloud server using SSH or do you have a CPanel for the same? Command explained above by @gelanivishal can be used on SSH command prompt to configure the crons.
You can make SSH connection using Putty software.
Let know if this help otherwise please provide more details on where you have the issue to provide more appropriate answer.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
I believed this how we do cron job on Google Cloud.please see attachment
thank yo
By default, a new Google Compute Engine (GCE) VM instance does not have SSH keys
we use ssh keys with our Compute Engine instances all the time.
and the easiest way is to use SSH icon to open SSH console, "sudo su" to login as root to the server and after su as a user to modify crontab and add new cronjobs.
or just get somebody who knows what they are doing to manage your server.
By default, a new Google Compute Engine (GCE) VM instance does not have SSH keys