SELECT COUNT(*) FROM cron_schedule AS main_table WHERE (job_code = 'ddg_automation_abandonedcarts') AND (scheduled_at = '') AND (status IN('success', 'failed'));
ERROR 1525 (HY000): Incorrect TIMESTAMP value: ''
Hello @huukhai87. If Magento\Cron\Model\Schedule::getScheduledAt() is returning an empty string here that suggests you have a running job with no scheduled_at date. Can you confirm?
Pausing the cron and deleting all running jobs will hopefully resolve this.
current environment: Magento 2.4.3 Mysql version: 8.0.19-10
issue case: test send abandoned cart by run command
cli:
result: error:
SELECT COUNT(*) FROM
cron_schedule
ASmain_table
WHERE (job_code
= 'ddg_automation_abandonedcarts') AND (scheduled_at
= '') AND (status
IN('success', 'failed')); ERROR 1525 (HY000): Incorrect TIMESTAMP value: ''expect: no error
the reason make this issue
file:https://github.com/dotmailer/dotmailer-magento2-extension/blob/master/Model/Cron/JobChecker.php
line:40 ->addFieldToFilter('scheduled_at', $currentRunningJob->getFirstItem()->getScheduledAt())
this code $currentRunningJob->getFirstItem()->getScheduledAt() is always return '' , in
scheduled_at
= ''it seems not to validate on Mysql8, everything good with the lower MySQL version