What is the proper command for the cron job?

SupportWhat is the proper command for the cron job?
blenkhn Staff asked 7 years ago
I have set the cron job as per plesk and the command looks like this: 60 * * * * cd <change to directory>;php -q wp-cron.php and I get a response like Could not open input file: wp-cron.php
/bin/sh: 60: command not found Suggestions?  I have also used the wordpress suggestion of 
0 0 * * * wget http://YOUR_SITE_URL/wp-cron.php

Same issue
3 Answers
Nikola Loncar Staff answered 7 years ago

Hi regarding interval can you please use this as first element

*/5

and place * for all other positions. Then try again.

Best regards,
Nikola

blenkhn Staff replied 7 years ago

I did that and I get a bad command error. And it doesn’t really matter as it’s a timing error

Nikola Loncar Staff answered 7 years ago
Hi can you please create a temp access for me. I can set everything up in a couple of minutes. Send me email to nikolanbg[at]gmail[dot]com. Best regards, Nikola
blenkhn Staff replied 7 years ago

Hi,

I got the cron to run on my plesk and I got this set of errors.

PHP Fatal error: Uncaught exception ‘Google_Auth_Exception’ with message ‘Error refreshing the OAuth2 token, message: ‘{
“error” : “invalid_request”,
“error_description” : “Missing required parameter: refresh_token”…

blenkhn Staff replied 7 years ago

Can you make the post private please?

Nikola Loncar Staff answered 7 years ago
No problem just first part is important to me. Refresh token is issue there. So looks like cron it is running now. Do following for that refresh token. First go to delete token in EA Extension setting. Then go to authorize again. If you don't get that dialog but instead it's closed immediately do deletion of token and repeat everything until you get google dialog where you approve access to your app. Best regards, Nikola
blenkhn Staff replied 7 years ago

A suggestion might be to give a command string to people based on this directly in the script so that it is just a copy and paste and a drop down to turn off the cron in your script as other scripts may need to use the wordpress cron.

Nikola Loncar Staff replied 7 years ago

Thanks for the suggestion, I will improve that part in next version. 🙂

Best regards,
Nikola