rackem
Well-Known Member
Looks like there is a bug with the PHP Scheduled Task. I have two tasks that I had created a while ago that were working fine until relatively recently (~ 1 month). Then I started having problems.
One task started generating a PHP timeout error whenever I ran it. The task completed just fine, it just ran until it timed out and then I got an error.
The other task did not complete and gave me a mySQL 1064 error related to the list the task was pointing to in the settings.
I was pulling my hair out trying to figure out what could be going on. Both of these are pointed to a script file but I tried copying the code into the code box - that didn't work. Now both of these tasks I run manually as needed. So they aren't really tied to the list they are pointing to. Out of curiosity, I switched the list the tasks pointed to in the settings to a very simple list. Now both tasks work properly again!
So it perhaps there is an element in these lists that the PHP Scheduled Task conflicted with that prevented them from running properly.
Here is the mySQL error in case it is helpful for troubleshooting:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT `mps_players`.`id` AS __pk_val0 FROM `mps_players` FROM `mps_players` L' at line 43 SQL=SELECT DISTINCT `mps_players`.`id` AS `mps_players___id`, `mps_players`.`id` AS `mps_players___id_raw`, `mps_players`.`date_time` AS `mps_players___date_time`, `mps_players`.`date_time` AS `mps_players___date_time_raw`, `mps_players`.`first_name` AS `mps_players___first_name`, `mps_players`.`first_name` AS `mps_players___first_name_raw`, `mps_players`.`first_plus_nickname` AS `mps_players___first_plus_nickname`, `mps_players`.`first_plus_nickname` AS `mps_players___first_plus_nickname_raw`, `mps_players`.`last_name` AS `mps_players___last_name`, `mps_players`.`last_name` AS `mps_players___last_name_raw`, `mps_players`.`nickname` AS `mps_players___nickname`, `mps_players`.`nickname` AS `mps_players___nickname_raw`, `mps_players`.`sex` AS `mps_players___sex`, `mps_players`.`sex` AS `mps_players___sex_raw`, `mps_players`.`notes` AS `mps_players___notes`, `mps_players`.`notes` AS `mps_players___notes_raw`, `mps_players`.`backup_first_name` AS `mps_players___backup_first_name`, `mps_players`.`backup_first_name` AS `mps_players___backup_first_name_raw`, `mps_players`.`backup_last_name` AS `mps_players___backup_last_name`, `mps_players`.`backup_last_name` AS `mps_players___backup_last_name_raw`, `mps_players`.`backup_nickname` AS `mps_players___backup_nickname`, `mps_players`.`backup_nickname` AS `mps_players___backup_nickname_raw`, `mps_players`.`backup_sex` AS `mps_players___backup_sex`, `mps_players`.`backup_sex` AS `mps_players___backup_sex_raw`, `mps_players`.`compare_backup` AS `mps_players___compare_backup`, `mps_players`.`compare_backup` AS `mps_players___compare_backup_raw`, `mps_players`.`active` AS `mps_players___active`, `mps_players`.`active` AS `mps_players___active_raw`, `mps_players`.`updated` AS `mps_players___updated`, `mps_players`.`updated` AS `mps_players___updated_raw`, `mps_players`.`edit_by` AS `mps_players___edit_by_raw`, `btxz_users`.`name` AS `mps_players___edit_by`, `mps_players`.`edited_when` AS `mps_players___edited_when`, `mps_players`.`edited_when` AS `mps_players___edited_when_raw`, `mps_players`.`admin_notes` AS `mps_players___admin_notes`, `mps_players`.`admin_notes` AS `mps_players___admin_notes_raw`, `mps_players`.`order` AS `mps_players___order`, `mps_players`.`order` AS `mps_players___order_raw`, `mps_players`.`owner` AS `mps_players___owner_raw`, `btxz_users_0`.`username` AS `mps_players___owner`, `mps_players`.`id` AS slug , `mps_players`.`id` AS `__pk_val` ,DISTINCT `mps_players`.`id` AS __pk_val0 FROM `mps_players` FROM `mps_players` LEFT JOIN `btxz_users` AS `btxz_users` ON `btxz_users`.`id` = `mps_players`.`edit_by` LEFT JOIN `btxz_users` AS `btxz_users_0` ON `btxz_users_0`.`id` = `mps_players`.`owner` LEFT JOIN `btxz_users` AS `btxz_users` ON `btxz_users`.`id` = `mps_players`.`edit_by` LEFT JOIN `btxz_users` AS `btxz_users_0` ON `btxz_users_0`.`id` = `mps_players`.`owner` ORDER BY `mps_players`.`id` DESC
The only "odd" thing about either of the original lists my task was pointing to was that I use a dbjoin element pointed to the J! users list. Like I said, this was all working fine for quite a while so not really sure what changed.
I can make a test site available if that will help with tracking down the problem.
One task started generating a PHP timeout error whenever I ran it. The task completed just fine, it just ran until it timed out and then I got an error.
The other task did not complete and gave me a mySQL 1064 error related to the list the task was pointing to in the settings.
I was pulling my hair out trying to figure out what could be going on. Both of these are pointed to a script file but I tried copying the code into the code box - that didn't work. Now both of these tasks I run manually as needed. So they aren't really tied to the list they are pointing to. Out of curiosity, I switched the list the tasks pointed to in the settings to a very simple list. Now both tasks work properly again!
So it perhaps there is an element in these lists that the PHP Scheduled Task conflicted with that prevented them from running properly.
Here is the mySQL error in case it is helpful for troubleshooting:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT `mps_players`.`id` AS __pk_val0 FROM `mps_players` FROM `mps_players` L' at line 43 SQL=SELECT DISTINCT `mps_players`.`id` AS `mps_players___id`, `mps_players`.`id` AS `mps_players___id_raw`, `mps_players`.`date_time` AS `mps_players___date_time`, `mps_players`.`date_time` AS `mps_players___date_time_raw`, `mps_players`.`first_name` AS `mps_players___first_name`, `mps_players`.`first_name` AS `mps_players___first_name_raw`, `mps_players`.`first_plus_nickname` AS `mps_players___first_plus_nickname`, `mps_players`.`first_plus_nickname` AS `mps_players___first_plus_nickname_raw`, `mps_players`.`last_name` AS `mps_players___last_name`, `mps_players`.`last_name` AS `mps_players___last_name_raw`, `mps_players`.`nickname` AS `mps_players___nickname`, `mps_players`.`nickname` AS `mps_players___nickname_raw`, `mps_players`.`sex` AS `mps_players___sex`, `mps_players`.`sex` AS `mps_players___sex_raw`, `mps_players`.`notes` AS `mps_players___notes`, `mps_players`.`notes` AS `mps_players___notes_raw`, `mps_players`.`backup_first_name` AS `mps_players___backup_first_name`, `mps_players`.`backup_first_name` AS `mps_players___backup_first_name_raw`, `mps_players`.`backup_last_name` AS `mps_players___backup_last_name`, `mps_players`.`backup_last_name` AS `mps_players___backup_last_name_raw`, `mps_players`.`backup_nickname` AS `mps_players___backup_nickname`, `mps_players`.`backup_nickname` AS `mps_players___backup_nickname_raw`, `mps_players`.`backup_sex` AS `mps_players___backup_sex`, `mps_players`.`backup_sex` AS `mps_players___backup_sex_raw`, `mps_players`.`compare_backup` AS `mps_players___compare_backup`, `mps_players`.`compare_backup` AS `mps_players___compare_backup_raw`, `mps_players`.`active` AS `mps_players___active`, `mps_players`.`active` AS `mps_players___active_raw`, `mps_players`.`updated` AS `mps_players___updated`, `mps_players`.`updated` AS `mps_players___updated_raw`, `mps_players`.`edit_by` AS `mps_players___edit_by_raw`, `btxz_users`.`name` AS `mps_players___edit_by`, `mps_players`.`edited_when` AS `mps_players___edited_when`, `mps_players`.`edited_when` AS `mps_players___edited_when_raw`, `mps_players`.`admin_notes` AS `mps_players___admin_notes`, `mps_players`.`admin_notes` AS `mps_players___admin_notes_raw`, `mps_players`.`order` AS `mps_players___order`, `mps_players`.`order` AS `mps_players___order_raw`, `mps_players`.`owner` AS `mps_players___owner_raw`, `btxz_users_0`.`username` AS `mps_players___owner`, `mps_players`.`id` AS slug , `mps_players`.`id` AS `__pk_val` ,DISTINCT `mps_players`.`id` AS __pk_val0 FROM `mps_players` FROM `mps_players` LEFT JOIN `btxz_users` AS `btxz_users` ON `btxz_users`.`id` = `mps_players`.`edit_by` LEFT JOIN `btxz_users` AS `btxz_users_0` ON `btxz_users_0`.`id` = `mps_players`.`owner` LEFT JOIN `btxz_users` AS `btxz_users` ON `btxz_users`.`id` = `mps_players`.`edit_by` LEFT JOIN `btxz_users` AS `btxz_users_0` ON `btxz_users_0`.`id` = `mps_players`.`owner` ORDER BY `mps_players`.`id` DESC
The only "odd" thing about either of the original lists my task was pointing to was that I use a dbjoin element pointed to the J! users list. Like I said, this was all working fine for quite a while so not really sure what changed.
I can make a test site available if that will help with tracking down the problem.