Cfschedule and Lucee


#1

I have a web app that uses the cfschedule tag to schedule tasks. We just converted from Railo. When we used this tag in Railo, the scheduled task showed up in the web administrator. This behavior is not happening in Lucee. Is this normal?


#2

Can you post the CFML you are using to schedule the task? In general, code running in Railo should work in the same way for Lucee.


#3

Here is the code

<cfschedule action="update"
		task="#arguments.myTask#"
		port="80"
		operation="HTTPRequest"
		url="#arguments.reportUrl#"
		hidden="false"
		startDate="#arguments.subscriptionStartDate#"
		startTime="#arguments.timeOfDay#"
		interval="#arguments.howOften#">

#4

That code looks fine. I suspect if there’s a compatibility issue its to do with the attribute data format. You might want to confirm that you can get a hand crafted CFSCHEDULE to run as expected before trouble shooting the attributes you are passing in dynamically.

Do you see anything at all in the lucee logs?


#5

This created a record in Lucee Web Admin

<h1>cfschedule</h1>

<cftry>
<cfschedule action="update"
			task="myTask"
			port="80"
			operation="HTTPRequest"
			url="http://127.0.0.1"
			hidden="false"
			startDate="2017-03-30"
			startTime="15:15:00"
			interval="3600">
	<p>Task Created</p>		
	<cfcatch>
		<cfdump var="#cfcatch#" label="error">
	</cfcatch>
</cftry>

#6

Are all arguments variables have values and in correct format? e.g. task name, date, time etc


#7

I am running into the same thing. I am on Lucee 5.2.5.20. I used your code and no record is created. I can create one by hand. Can’t find anything else on the web to help troubleshoot. I may try to edit the scheduler.xml file directly.


#8

You may want to see my post on a similar topic for your answer (basically you will find the task in web context of the admin for your site)


#9

You need to make sure you are accessing we correct context. WWW1.blah.com is stored in a different location than WWW2.blah.com. So if your scheduled task update is being called from www1.blah.com, you need to look in that web context using www1.blah.com/lucee/admin/web.cfm to see the scheduled tasks.

We use a ton of auto created scheduled tasks and we are seeing no issues with creating or deleting them. They also all show up as expected.