Cron problem

Support forumCategory: QuestionsCron problem
Pabro66 asked 2 years ago
Hi after I installed Easy Appointment Connect Plugin I had this warning from Wordpress: "Your Cron is running inside WordPress! Please consider setting Cron to run from System Task Scheduler! By doing that all background task are going to execute on time and without any limitation. Please follow official WordPress guide on Hooking WP-Cron Into the System Task Scheduler." What does it mean: is it normal?
8 Answers
Nikola Loncar Staff answered 2 years ago
Hi, Cron jobs are things that runs in background of your site. For example when WP is checking if there are new version etc. If you don't have it connected to your hosting scheduler then it is running when someone visits your site. In that case it is relying on visitors and if there are none for example for 2 hours then it will not do any cron tasks. By connecting it to your hosting scheduler you ensure that it will have execution on exact interval. Best regards, Nikola
Pabro66 answered 2 years ago
Unfortunately my hosting provider confirmed that the connection with the scheduler cannot be done in a shared environment (I have a shared hosting). So I have no chance to have the sync back from Google Calendar on a proper schedule, is it?
Pabro66 answered 2 years ago
Hi Nikola, I deleted an appointment more than one hour ago from Google Calendar, about half an hour ago I also tried to visit my site in incognito more times, but Google Calendar is not synced back to your plugin. What else should I do?!?!?!?
Pabro66 answered 2 years ago
Ok now it also stopped syncing to Google Calendar!!! I touched nothing! Please help!
Nikola Loncar Staff answered 2 years ago
Hi, do you have any warning message when you open EA Extension Google settings? It should show the last time it was doing sync. Also I would suggest that you turn debugging level to max so you can see all sync details inside log file. Best regards, Nikola
Pabro66 answered 2 years ago
Thanks for the response: I also opened another ticket (Sending Appointments to Google Calendar) and there I placed all the cron details. Please have a quick look there: there are all the details of all my remaining problems! It started to work everything but then, without changing anything, the appointments stopped to be sent to Google Calendar by the plugin :-(
This is my configuration: Config 1 This is the log of Cron from WP Crontrol: [2022-07-22 15:21:09.624113] [debug] Calendars for sync
primary: array(
‘location’ => ‘1’,
‘service’ => ’11’,
‘worker’ => ‘1’,
)
[2022-07-22 15:21:09.624347] [info] Syncing events for Calendar: primary
[2022-07-22 15:21:09.624397] [info] Sync event within next 365
[2022-07-22 15:21:09.814362] [info] Fetched from Google Calendar 0 events
[2022-07-22 15:21:09.818140] [info] Synced events : 0
[2022-07-22 15:21:09.818196] [info] Total sync events : 0
[2022-07-22 15:21:09.818711] [info] Found 2 events in EA but on on GCal
[2022-07-22 15:21:09.822423] [info] Sync Done As you can see I have two appointments that were not synced to Google Calendar. The point is that after I tried to remove the token and authorize it again, it starts working again, but after some hours it stops syncing to Google Calendar and it becomes less reliable in getting the appointments back from Google Calendar. I cannot give it to my customer like this. Please help
Nikola Loncar Staff answered 2 years ago
Hi, you need to connect it to hosting scheduler. It's should be easy if you have like CPanel there. Here is docs how to do it https://easy-appointments.net/documentation/connect-system-scheduler-cron/ once that is done you should not see those 2 warnings at the top of the page. Also do you have any errors inside error log file on your hosting? Best regards, Nikola
Pabro66 answered 2 years ago
Thank Nikola, but the cron is not my main problem, in fact is running nearly on schedule, as you can see from the log file: [2022-07-25 9:16:43.686724] [debug] Calendars for sync
primary: array(
'location' => '1',
'service' => '11',
'worker' => '1',
)
[2022-07-25 9:16:43.687033] [info] Syncing events for Calendar: primary
[2022-07-25 9:16:43.687100] [info] Sync event within next 365
[2022-07-25 9:16:43.877037] [info] Fetched from Google Calendar 1 events
[2022-07-25 9:16:43.884141] [info] Synced events : 1
[2022-07-25 9:16:43.884207] [info] Total sync events : 1
[2022-07-25 9:16:43.885023] [info] Found 1 events in EA but on on GCal
[2022-07-25 9:16:43.886904] [info] Sync Done
[2022-07-25 9:26:06.646954] [info] Sync started
[2022-07-25 9:26:06.647097] [debug] Calendars for sync
primary: array(
'location' => '1',
'service' => '11',
'worker' => '1',
)
[2022-07-25 9:26:06.647268] [info] Syncing events for Calendar: primary
[2022-07-25 9:26:06.647301] [info] Sync event within next 365
[2022-07-25 9:26:06.843931] [info] Fetched from Google Calendar 1 events
[2022-07-25 9:26:06.850153] [info] Synced events : 1
[2022-07-25 9:26:06.850214] [info] Total sync events : 1
[2022-07-25 9:26:06.851087] [info] Found 1 events in EA but on on GCal
[2022-07-25 9:26:06.853197] [info] Sync Done
[2022-07-25 9:34:27.076096] [info] Sync started
[2022-07-25 9:34:27.076308] [debug] Calendars for sync
primary: array(
'location' => '1',
'service' => '11',
'worker' => '1',
)
[2022-07-25 9:34:27.076584] [info] Syncing events for Calendar: primary
[2022-07-25 9:34:27.076644] [info] Sync event within next 365
[2022-07-25 9:34:27.420933] [info] Fetched from Google Calendar 1 events
[2022-07-25 9:34:27.427220] [info] Synced events : 1
[2022-07-25 9:34:27.427278] [info] Total sync events : 1
[2022-07-25 9:34:27.428132] [info] Found 1 events in EA but on on GCal
[2022-07-25 9:34:27.430054] [info] Sync Done
[2022-07-25 9:42:18.608823] [info] Sync started
[2022-07-25 9:42:18.608983] [debug] Calendars for sync
primary: array(
'location' => '1',
'service' => '11',
'worker' => '1',
)
[2022-07-25 9:42:18.609167] [info] Syncing events for Calendar: primary
[2022-07-25 9:42:18.609206] [info] Sync event within next 365
[2022-07-25 9:42:18.816889] [info] Fetched from Google Calendar 1 events
[2022-07-25 9:42:18.823271] [info] Synced events : 1
[2022-07-25 9:42:18.823299] [info] Total sync events : 1
[2022-07-25 9:42:18.823836] [info] Found 1 events in EA but on on GCal
[2022-07-25 9:42:18.825042] [info] Sync Done
[2022-07-25 9:50:42.224904] [info] Sync started
[2022-07-25 9:50:42.225079] [debug] Calendars for sync
primary: array(
'location' => '1',
'service' => '11',
'worker' => '1',
)
[2022-07-25 9:50:42.225322] [info] Syncing events for Calendar: primary
[2022-07-25 9:50:42.225373] [info] Sync event within next 365
[2022-07-25 9:50:42.499176] [info] Fetched from Google Calendar 1 events
[2022-07-25 9:50:42.507613] [info] Synced events : 1
[2022-07-25 9:50:42.507675] [info] Total sync events : 1
[2022-07-25 9:50:42.508430] [info] Found 1 events in EA but on on GCal
[2022-07-25 9:50:42.510242] [info] Sync Done
[2022-07-25 9:58:03.505908] [info] Sync started
[2022-07-25 9:58:03.506117] [debug] Calendars for sync
primary: array(
'location' => '1',
'service' => '11',
'worker' => '1',
)
[2022-07-25 9:58:03.506390] [info] Syncing events for Calendar: primary
[2022-07-25 9:58:03.506449] [info] Sync event within next 365
[2022-07-25 9:58:03.749365] [info] Fetched from Google Calendar 1 events
[2022-07-25 9:58:03.755722] [info] Synced events : 1
[2022-07-25 9:58:03.755780] [info] Total sync events : 1
[2022-07-25 9:58:03.756572] [info] Found 1 events in EA but on on GCal
[2022-07-25 9:58:03.758374] [info] Sync Done
[2022-07-25 10:08:17.229269] [info] Sync started
[2022-07-25 10:08:17.229474] [debug] Calendars for sync
primary: array(
'location' => '1',
'service' => '11',
'worker' => '1',
)
[2022-07-25 10:08:17.229751] [info] Syncing events for Calendar: primary
[2022-07-25 10:08:17.229821] [info] Sync event within next 365
[2022-07-25 10:08:17.479705] [info] Fetched from Google Calendar 1 events
[2022-07-25 10:08:17.486068] [info] Synced events : 1
[2022-07-25 10:08:17.486125] [info] Total sync events : 1
[2022-07-25 10:08:17.486901] [info] Found 1 events in EA but on on GCal
[2022-07-25 10:08:17.488827] [info] Sync Done The point is that it stopped sending, without any reason, the Appointments from your plugin to Google Calendar, fact that is also possible to see from the log file, in which there is an event in A but not on GCal. PLEASE HELP!  This way I cannot deliver the site to my customer, that is waiting . . .