May i know the functionality of scheduler daily event works. i need to create record based on a retest date say for example (if retest date: “02-08-2020” and current date matches the retest date “02-08-2020” on morning 00:00 time its self it should create.) but scheduler daily event working on 02-08-2020 changes to 03-08-2020 at that time only it creates new record.
Does any one knows how scheduler works daily.
Anybody knows how daily event works?
Refer this one: Scheduler Events Daily
Hi @asanodaria!! thanks for your response in my case i am running a query
frappe.db.sql(“”“select name,ar_no,expiry_date from
where status = ‘Approved’ and datediff(retest_date,now()) = 0 “””)
retest_date = “08-08-2020” and now date = “07-08-2020”
as per above link scheduler events daily will trigger first time after now date change. but for myself the scheduler works when now date changes to “09-08-2020” only…
As per query it should create on the first time of now date changes to “08-08-2020” right? it is not happening.
Any one help me out
try this in your query:
DATEDIFF(CURDATE(), retest_date) = 0
hi @asanodaria thanks for your kind reply…i tried DATEDIFF(CURDATE(), retest_date) = 0 no change same problem
daily schedular would work, Kindly confirm that you are using frappe.utils.today() instead of date.today() and frappe.utils.now() instead of datetime.now()