Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually running the cron on Backdrop 1.6.0 does not work #2527

Closed
ghost opened this issue Feb 10, 2017 · 10 comments
Closed

Manually running the cron on Backdrop 1.6.0 does not work #2527

ghost opened this issue Feb 10, 2017 · 10 comments

Comments

@ghost
Copy link

ghost commented Feb 10, 2017

Hello Developers,

Today I wanted to run the cron manually in the backend of Backdrop 1.6.0. Unfortunately that does not work. The frontend is only displayed in German.

"An unexpected error has occurred"

Otherwise, no other error message.

Can you please check this again on the test pages with Backdrop 1.6.0 and check it.

Thanks in advance.

@Graham-72
Copy link

Graham-72 commented Feb 10, 2017

@AlexL777 are you using Backdrop on a local system or a server on the network? I believe there are special arrangements for running cron on localhost and so it may not be a problem with Backdrop.

@klonos has this anything to do with #2309 although I am not sure that the content of that issue corresponds to its title.

@ghost
Copy link
Author

ghost commented Feb 10, 2017

My backdrop site is running on a managed server on the Internet. But I found a cron module in the official module directory. Now everything is all right again and the cron I could run manually.

But the software-specific cron did not run manually. I do not know now whether everyone has so.

For me on the server, PHP 7.0 and MySQL 5.6 are active. Does it have anything to do with it?

@Graham-72
Copy link

@AlexL777 I think I see what you mean.

If I use the link on the site 'run cron' ( /admin/reports/status/run-cron ) then cron will run successfully.

But if I use /cron.php I get 'Access Denied - You are not authorized to access this page. ' even though I am logged in as admin.

And if I use the link on the Status Report page where it says 'To run cron from outside the site, go to http://www.yoursite.com/backdrop/core/cron.php?cron_key=5QUN_JnosPAQnxF8t3r8e3_N5NOdgTYTxFX-ovDrj5Q' I get a blank screen.

So yes, something seems to be wrong. Do you get these same results?

@Graham-72 Graham-72 changed the title Manually running the crone on Backdrop 1.6.0 does not work Manually running the cron on Backdrop 1.6.0 does not work Feb 10, 2017
@ghost
Copy link
Author

ghost commented Feb 10, 2017

Yes, I had the same result today. Do I then or may I then the file /cron.php CHMOD 777 give or would then the security is endangered?

I'll try it tomorrow. Thank you for your attention.

@herbdool
Copy link

It all seems fine to me. If you're accessing cron.php you always need the cron_key and it doesn't have anything to do with your user session. You should not have to change the file permissions.

You will always see a blank screen if you access the file directly because it's not bootstrapping Drupal fully and it has nothing to output to the browser.

@serundeputy
Copy link
Member

Hi @AlexL777 thanks for reporting

Cron is running fine both from the Run Cron button on the page admin/config/system/cron and from the external link:

cron

Make sure if you are running cron via the external link and be sure to include the entire URL and the hash as shown on the page admin/config/system/cron.

If it is still not working for you can you identify any steps that we are missing and post back here so we can lock down the issue and provide a solution.

thanks,
~Geoff

@quicksketch
Copy link
Member

If I use the link on the site 'run cron' ( /admin/reports/status/run-cron ) then cron will run successfully.

But if I use /cron.php I get 'Access Denied - You are not authorized to access this page. ' even though I am logged in as admin.

And if I use the link on the Status Report page where it says 'To run cron from outside the site, go to http://www.yoursite.com/backdrop/core/cron.php?cron_key=5QUN_JnosPAQnxF8t3r8e3_N5NOdgTYTxFX-ovDrj5Q' I get a blank screen.

This is all the expected behavior. Perhaps the main confusion here is that cron.php doesn't actually return anything. A blank page is the expected result. Perhaps we should update that to actually return a message of some kind?

It's worth noting that "cron_key" is required in the URL. Without a cron_key in the query string, it should return access denied, as publicly allowing cron.php to be accessed by any user on the internet is a potential source of problems, so the cron_key acts as basic access control.

@Graham-72
Copy link

Graham-72 commented Feb 13, 2017

Thanks @quicksketch . But why didn't it work when I used the URL with the cron key given on the status report page? Ah, I see that it does run, but leaves one with a blank page. Apologies for misunderstanding.

@ghost
Copy link
Author

ghost commented Feb 13, 2017

Hallo Developers,
@serundeputy ,
Thank you for confirming that the cron works properly. I have the help of the Cron module and can now run the Cron well.

@herbdool
Copy link

Perhaps the main confusion here is that cron.php doesn't actually return anything. A blank page is the expected result. Perhaps we should update that to actually return a message of some kind?

That's a good idea. I can create a new issue with that specifically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants