How to setup Magento 2.2 cron job?
I have just made a fresh installation of Magento 2.2.1 to eventually be able to migrate from my present 1.7.
But I already encountered some difficulties.
The message "One or more indexes are invalid. Make sure your Magento cron job is running." is showing in admin.
I tried to google how to get the cron job running but can't find how to do it in cPanel, and I don't understand how to get it running.
I do not have SSH access and can't do anything through CLI. Does anybody know how I can get this cron thing set up and working from cPanel?
cron magento2.2 cpanel
add a comment |
I have just made a fresh installation of Magento 2.2.1 to eventually be able to migrate from my present 1.7.
But I already encountered some difficulties.
The message "One or more indexes are invalid. Make sure your Magento cron job is running." is showing in admin.
I tried to google how to get the cron job running but can't find how to do it in cPanel, and I don't understand how to get it running.
I do not have SSH access and can't do anything through CLI. Does anybody know how I can get this cron thing set up and working from cPanel?
cron magento2.2 cpanel
whether your issue is solved
– Visakh B Sujathan
Feb 6 '18 at 10:16
add a comment |
I have just made a fresh installation of Magento 2.2.1 to eventually be able to migrate from my present 1.7.
But I already encountered some difficulties.
The message "One or more indexes are invalid. Make sure your Magento cron job is running." is showing in admin.
I tried to google how to get the cron job running but can't find how to do it in cPanel, and I don't understand how to get it running.
I do not have SSH access and can't do anything through CLI. Does anybody know how I can get this cron thing set up and working from cPanel?
cron magento2.2 cpanel
I have just made a fresh installation of Magento 2.2.1 to eventually be able to migrate from my present 1.7.
But I already encountered some difficulties.
The message "One or more indexes are invalid. Make sure your Magento cron job is running." is showing in admin.
I tried to google how to get the cron job running but can't find how to do it in cPanel, and I don't understand how to get it running.
I do not have SSH access and can't do anything through CLI. Does anybody know how I can get this cron thing set up and working from cPanel?
cron magento2.2 cpanel
cron magento2.2 cpanel
edited Nov 22 '17 at 12:32
David Lambauer
6481416
6481416
asked Nov 22 '17 at 12:09
Ronnie79Ronnie79
2613
2613
whether your issue is solved
– Visakh B Sujathan
Feb 6 '18 at 10:16
add a comment |
whether your issue is solved
– Visakh B Sujathan
Feb 6 '18 at 10:16
whether your issue is solved
– Visakh B Sujathan
Feb 6 '18 at 10:16
whether your issue is solved
– Visakh B Sujathan
Feb 6 '18 at 10:16
add a comment |
4 Answers
4
active
oldest
votes
you can add ssh via cpanel. try this link
after ssh is enabled.you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install.
@Ronnie79 whether your issue is solved.if solved mark as resolved
– Visakh B Sujathan
Dec 1 '17 at 8:43
add a comment |
You have to have SSH access to your Magento 2 installation in order to run it as smooth as it should. Make sure, you get the access.
As soon as you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install
. That should be enough.
In case the only way for you is to add the cron through an admin interface like cpanel; try to add the cron jobs line by line.
* * * * * <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
Depending in the admin panel, you might have to enter the path to the PHP binary. If you are not sure which path it is, just try php.
Oh. Is there no way to do it in cPanel with Cron Job? Our Host doesn't allow SSH access to anyone for security reasons they say. But our host still offer Magento installation in their installatron...
– Ronnie79
Nov 22 '17 at 16:45
Are you able to add CronJobs through the cPanel?
– David Lambauer
Nov 22 '17 at 16:48
Can you enter something like* * * * www-data super_cool_command
somewhere in cPanel?
– David Lambauer
Nov 22 '17 at 16:49
Yes, I can add a Cron Job in cPanel. One line command and choose if I want it to be run every minute, every hour etc. But don't know what command to write there to make it work...
– Ronnie79
Nov 22 '17 at 17:43
Nice! That is exactly what you need. I'll send you the lines in a few hours.
– David Lambauer
Nov 23 '17 at 6:26
|
show 4 more comments
try this one
Here are the relevant lines in .htaccess (read the comments):
<FilesMatch "^cron.*.php$">
...
</FilesMatch>
add a comment |
- I think I sorted it out now.
- I was not sure if this is the right way but this is how I did it:
I created one cron job that run every minute in my cPanel:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:install
Then after one minute when I got an email that this was performed I deleted it and created a new one like this instead:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:run
Or do I also need to add * * * * * <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 as cron jobs?
– Ronnie79
Dec 2 '17 at 9:36
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f202732%2fhow-to-setup-magento-2-2-cron-job%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
you can add ssh via cpanel. try this link
after ssh is enabled.you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install.
@Ronnie79 whether your issue is solved.if solved mark as resolved
– Visakh B Sujathan
Dec 1 '17 at 8:43
add a comment |
you can add ssh via cpanel. try this link
after ssh is enabled.you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install.
@Ronnie79 whether your issue is solved.if solved mark as resolved
– Visakh B Sujathan
Dec 1 '17 at 8:43
add a comment |
you can add ssh via cpanel. try this link
after ssh is enabled.you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install.
you can add ssh via cpanel. try this link
after ssh is enabled.you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install.
answered Nov 23 '17 at 6:24
Visakh B SujathanVisakh B Sujathan
357216
357216
@Ronnie79 whether your issue is solved.if solved mark as resolved
– Visakh B Sujathan
Dec 1 '17 at 8:43
add a comment |
@Ronnie79 whether your issue is solved.if solved mark as resolved
– Visakh B Sujathan
Dec 1 '17 at 8:43
@Ronnie79 whether your issue is solved.if solved mark as resolved
– Visakh B Sujathan
Dec 1 '17 at 8:43
@Ronnie79 whether your issue is solved.if solved mark as resolved
– Visakh B Sujathan
Dec 1 '17 at 8:43
add a comment |
You have to have SSH access to your Magento 2 installation in order to run it as smooth as it should. Make sure, you get the access.
As soon as you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install
. That should be enough.
In case the only way for you is to add the cron through an admin interface like cpanel; try to add the cron jobs line by line.
* * * * * <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
Depending in the admin panel, you might have to enter the path to the PHP binary. If you are not sure which path it is, just try php.
Oh. Is there no way to do it in cPanel with Cron Job? Our Host doesn't allow SSH access to anyone for security reasons they say. But our host still offer Magento installation in their installatron...
– Ronnie79
Nov 22 '17 at 16:45
Are you able to add CronJobs through the cPanel?
– David Lambauer
Nov 22 '17 at 16:48
Can you enter something like* * * * www-data super_cool_command
somewhere in cPanel?
– David Lambauer
Nov 22 '17 at 16:49
Yes, I can add a Cron Job in cPanel. One line command and choose if I want it to be run every minute, every hour etc. But don't know what command to write there to make it work...
– Ronnie79
Nov 22 '17 at 17:43
Nice! That is exactly what you need. I'll send you the lines in a few hours.
– David Lambauer
Nov 23 '17 at 6:26
|
show 4 more comments
You have to have SSH access to your Magento 2 installation in order to run it as smooth as it should. Make sure, you get the access.
As soon as you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install
. That should be enough.
In case the only way for you is to add the cron through an admin interface like cpanel; try to add the cron jobs line by line.
* * * * * <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
Depending in the admin panel, you might have to enter the path to the PHP binary. If you are not sure which path it is, just try php.
Oh. Is there no way to do it in cPanel with Cron Job? Our Host doesn't allow SSH access to anyone for security reasons they say. But our host still offer Magento installation in their installatron...
– Ronnie79
Nov 22 '17 at 16:45
Are you able to add CronJobs through the cPanel?
– David Lambauer
Nov 22 '17 at 16:48
Can you enter something like* * * * www-data super_cool_command
somewhere in cPanel?
– David Lambauer
Nov 22 '17 at 16:49
Yes, I can add a Cron Job in cPanel. One line command and choose if I want it to be run every minute, every hour etc. But don't know what command to write there to make it work...
– Ronnie79
Nov 22 '17 at 17:43
Nice! That is exactly what you need. I'll send you the lines in a few hours.
– David Lambauer
Nov 23 '17 at 6:26
|
show 4 more comments
You have to have SSH access to your Magento 2 installation in order to run it as smooth as it should. Make sure, you get the access.
As soon as you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install
. That should be enough.
In case the only way for you is to add the cron through an admin interface like cpanel; try to add the cron jobs line by line.
* * * * * <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
Depending in the admin panel, you might have to enter the path to the PHP binary. If you are not sure which path it is, just try php.
You have to have SSH access to your Magento 2 installation in order to run it as smooth as it should. Make sure, you get the access.
As soon as you have access to your instance, go to the Magento 2 root directory and run php bin/magento cron:install
. That should be enough.
In case the only way for you is to add the cron through an admin interface like cpanel; try to add the cron jobs line by line.
* * * * * <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
Depending in the admin panel, you might have to enter the path to the PHP binary. If you are not sure which path it is, just try php.
edited Nov 23 '17 at 7:49
answered Nov 22 '17 at 12:34
David LambauerDavid Lambauer
6481416
6481416
Oh. Is there no way to do it in cPanel with Cron Job? Our Host doesn't allow SSH access to anyone for security reasons they say. But our host still offer Magento installation in their installatron...
– Ronnie79
Nov 22 '17 at 16:45
Are you able to add CronJobs through the cPanel?
– David Lambauer
Nov 22 '17 at 16:48
Can you enter something like* * * * www-data super_cool_command
somewhere in cPanel?
– David Lambauer
Nov 22 '17 at 16:49
Yes, I can add a Cron Job in cPanel. One line command and choose if I want it to be run every minute, every hour etc. But don't know what command to write there to make it work...
– Ronnie79
Nov 22 '17 at 17:43
Nice! That is exactly what you need. I'll send you the lines in a few hours.
– David Lambauer
Nov 23 '17 at 6:26
|
show 4 more comments
Oh. Is there no way to do it in cPanel with Cron Job? Our Host doesn't allow SSH access to anyone for security reasons they say. But our host still offer Magento installation in their installatron...
– Ronnie79
Nov 22 '17 at 16:45
Are you able to add CronJobs through the cPanel?
– David Lambauer
Nov 22 '17 at 16:48
Can you enter something like* * * * www-data super_cool_command
somewhere in cPanel?
– David Lambauer
Nov 22 '17 at 16:49
Yes, I can add a Cron Job in cPanel. One line command and choose if I want it to be run every minute, every hour etc. But don't know what command to write there to make it work...
– Ronnie79
Nov 22 '17 at 17:43
Nice! That is exactly what you need. I'll send you the lines in a few hours.
– David Lambauer
Nov 23 '17 at 6:26
Oh. Is there no way to do it in cPanel with Cron Job? Our Host doesn't allow SSH access to anyone for security reasons they say. But our host still offer Magento installation in their installatron...
– Ronnie79
Nov 22 '17 at 16:45
Oh. Is there no way to do it in cPanel with Cron Job? Our Host doesn't allow SSH access to anyone for security reasons they say. But our host still offer Magento installation in their installatron...
– Ronnie79
Nov 22 '17 at 16:45
Are you able to add CronJobs through the cPanel?
– David Lambauer
Nov 22 '17 at 16:48
Are you able to add CronJobs through the cPanel?
– David Lambauer
Nov 22 '17 at 16:48
Can you enter something like
* * * * www-data super_cool_command
somewhere in cPanel?– David Lambauer
Nov 22 '17 at 16:49
Can you enter something like
* * * * www-data super_cool_command
somewhere in cPanel?– David Lambauer
Nov 22 '17 at 16:49
Yes, I can add a Cron Job in cPanel. One line command and choose if I want it to be run every minute, every hour etc. But don't know what command to write there to make it work...
– Ronnie79
Nov 22 '17 at 17:43
Yes, I can add a Cron Job in cPanel. One line command and choose if I want it to be run every minute, every hour etc. But don't know what command to write there to make it work...
– Ronnie79
Nov 22 '17 at 17:43
Nice! That is exactly what you need. I'll send you the lines in a few hours.
– David Lambauer
Nov 23 '17 at 6:26
Nice! That is exactly what you need. I'll send you the lines in a few hours.
– David Lambauer
Nov 23 '17 at 6:26
|
show 4 more comments
try this one
Here are the relevant lines in .htaccess (read the comments):
<FilesMatch "^cron.*.php$">
...
</FilesMatch>
add a comment |
try this one
Here are the relevant lines in .htaccess (read the comments):
<FilesMatch "^cron.*.php$">
...
</FilesMatch>
add a comment |
try this one
Here are the relevant lines in .htaccess (read the comments):
<FilesMatch "^cron.*.php$">
...
</FilesMatch>
try this one
Here are the relevant lines in .htaccess (read the comments):
<FilesMatch "^cron.*.php$">
...
</FilesMatch>
edited Feb 23 '18 at 7:00
answered Nov 24 '17 at 9:17
Visa EcitVisa Ecit
114
114
add a comment |
add a comment |
- I think I sorted it out now.
- I was not sure if this is the right way but this is how I did it:
I created one cron job that run every minute in my cPanel:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:install
Then after one minute when I got an email that this was performed I deleted it and created a new one like this instead:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:run
Or do I also need to add * * * * * <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 as cron jobs?
– Ronnie79
Dec 2 '17 at 9:36
add a comment |
- I think I sorted it out now.
- I was not sure if this is the right way but this is how I did it:
I created one cron job that run every minute in my cPanel:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:install
Then after one minute when I got an email that this was performed I deleted it and created a new one like this instead:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:run
Or do I also need to add * * * * * <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 as cron jobs?
– Ronnie79
Dec 2 '17 at 9:36
add a comment |
- I think I sorted it out now.
- I was not sure if this is the right way but this is how I did it:
I created one cron job that run every minute in my cPanel:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:install
Then after one minute when I got an email that this was performed I deleted it and created a new one like this instead:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:run
- I think I sorted it out now.
- I was not sure if this is the right way but this is how I did it:
I created one cron job that run every minute in my cPanel:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:install
Then after one minute when I got an email that this was performed I deleted it and created a new one like this instead:
/usr/local/bin/php /home/[my username]/domains/[my domain]/public_html/bin/magento cron:run
edited 11 mins ago
Teja Bhagavan Kollepara
2,98141947
2,98141947
answered Nov 24 '17 at 17:13
Ronnie79Ronnie79
2613
2613
Or do I also need to add * * * * * <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 as cron jobs?
– Ronnie79
Dec 2 '17 at 9:36
add a comment |
Or do I also need to add * * * * * <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 as cron jobs?
– Ronnie79
Dec 2 '17 at 9:36
Or do I also need to add * * * * * <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 as cron jobs?
– Ronnie79
Dec 2 '17 at 9:36
Or do I also need to add * * * * * <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 as cron jobs?
– Ronnie79
Dec 2 '17 at 9:36
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f202732%2fhow-to-setup-magento-2-2-cron-job%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
whether your issue is solved
– Visakh B Sujathan
Feb 6 '18 at 10:16