anyone knows how can i write an email to me if onm...
# cfml-beginners
g
anyone knows how can i write an email to me if onmisfire executes in cfschedule
e
I believe you want "ON MIS FIRE", which you would use something like this <cftry> <cfschedule action="run" task="myTask" startdate="#CreateODBCDateTime(Now())#" interval="Daily" timeofday="23:59"> <cfcatch> <!--- Send an email notification when the task misses its execution ---!> <cfmail to="your_email@foo" from="your_emailserver@foo" subject="Missed Scheduled Task Notification from server X" type="html"> INFO -The scheduled task "myTask" has missed its execution. </cfmail> </cfcatch> </cftry>
g
I am not using the tag based approach I am using from cfadmin and it has a drop-down of onmisfire and it has a value of inbokehandler as option I want to use that to send me email
e
Best of luck then.
a
it has a value of inbokehandler as option
Hrm Did you read the docs? I see this (@ https://helpx.adobe.com/uk/coldfusion/cfml-reference/coldfusion-tags/tags-r-s/cfschedule.html):
• invokeHandler : Invokes onError method of the event handler as defined by the user.
Did you try that?
g
I did read that and I also checked the method it declared it as void but I am bit confused how it work if I create it
a
OK, so you... did what? You are kinda making us guess, which is (and I've said this to you before) not a great way of letting us know what you've done.
👍 1
show us the code