insert into cron_log(id,log_str) values(0,'Process Apps: Cron triggered1 on 2026-04-01 16:13:26')select appointments.*,patients.op_id op_contactid from appointments left join patients on appointments.patient_id=patients.cliniko_id where appointments.op_processed=0 and appointments.op_attempt_no<3 and appointments.patient_id in (select cliniko_id from patients where op_processed=1 and op_id<>0) order by id limit 0,201775060007