Skip to main content
Legend
March 7, 2019
Answered

ColdFusion 2018 - CFSCHEDULE not adding task

  • March 7, 2019
  • 4 replies
  • 2761 views

Hi,

We migrated from CF10 to CF2018 and our CFSCHEDULE tag will not now add a task. Our code is simple, just:

  <cfschedule action="UPDATE"

              task="test"

              group="test"

              operation="HTTPRequest"

              startdate="#DateFormat(Now(), "mm/dd/yyyy")#"

              startTime="#TimeFormat(DateAdd("n", 2, Now()), "HH:mm")#"

              url="http://127.0.0.1/test/somescript.cfm"

              interval="once">

Whatever we try, the task is never added to the CF-Admin. No errors in the logs. The /test folder has no authentication etc and the script runs if called directly on the server.

Suggestions appreciated!

Thanks,

Mark

This topic has been closed for replies.
Correct answer tribule

The issue was permissions. Windows authentication was needed on the folder in which the script for CFSCHEDULE was run. Without that it will not add the task. I went in to ISS, browsed to the folder where the script was contained, clicked Authentication, and then selected "Enable" for Windows Authentication. The tasks were then added. This worked for me anyway.

4 replies

BKBK
Community Expert
Community Expert
March 9, 2019

tribule  wrote

   <cfschedule action="UPDATE"

              task="test"

              group="test"

              operation="HTTPRequest"

              startdate="#DateFormat(Now(), "mm/dd/yyyy")#"

              startTime="#TimeFormat(DateAdd("n", 2, Now()), "HH:mm")#"

              url="http://127.0.0.1/test/somescript.cfm"

              interval="once">

Change the double quotes within the startDate and startTime strings to single quotes:

   startdate="#dateFormat(now(), 'mm/dd/yyyy')#"

   startTime="#timeFormat(dateAdd('n', 2, now()), 'HH:mm')#"

tribuleAuthor
Legend
March 9, 2019

Tried that already too, alas no luck.

tribuleAuthorCorrect answer
Legend
March 9, 2019

The issue was permissions. Windows authentication was needed on the folder in which the script for CFSCHEDULE was run. Without that it will not add the task. I went in to ISS, browsed to the folder where the script was contained, clicked Authentication, and then selected "Enable" for Windows Authentication. The tasks were then added. This worked for me anyway.

WolfShade
Legend
March 8, 2019

tribule  wrote

Hi,

We migrated from CF10 to CF2018 and our CFSCHEDULE tag will not now add a task. Our code is simple, just:

  <cfschedule action="UPDATE"

Okay, I've read and re-read all posts in this thread three times.. and I'm confused.

Are you trying to ADD a task?  Or UPDATE a task?

According to Adobe Help, UPDATE _should_ create a task if a task with that name does not exist.  But I wouldn't count on it.

If you're trying to ADD a task, why not set the action to CREATE???

V/r,

^ _ ^

tribuleAuthor
Legend
March 9, 2019

Hi, in the CF docs (at ColdFusion Help | cfschedule) "UPDATE" also adds a task if it already does not exist. We used this code on CF10 without issue for years.

Also, when we use "CREATE" this is the error we get:

"The value of the ACTION attribute, which is currently create, must be one of the values:

PAUSEALL,RESUME,RESUMEALL,UPDATE,RUN,LIST,DELETE,PAUSE."

Yet the docs say "ColdFusion (2018 release) Update 2: Introduced the actions Create and Modify." We are on update 3 (installed it yesterday) and it still has the same issue.

Weird eh? Bug?

tribuleAuthor
Legend
March 8, 2019

Ticket opened with Adobe, will share feedback.

Community Expert
March 7, 2019

This is just a guess. But my guess is that this is related to other scheduled task problems people ran into when upgrading. I suspect that if you delete and recreate the scheduled task, updates to it will then work fine. But obviously that can be a bit of a pain if you have lots of scheduled tasks.

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC
tribuleAuthor
Legend
March 8, 2019

Hi Dave, thanks for the reply. This task never makes it in to the CF Admin scheduled tasks list. The real task we create has a unique task name as well, since this script might get lots of submissions (this task is for report generation).

Do you mean I should erase all my existing scheduled tasks?

If it's a permissions problem, what permissions do we need to set?

Edited to say: We did not use the CF upgrade application, we just moved our codebase from CF10 to a new CF2018 server.

Community Expert
March 8, 2019

I think I missed something in your initial post. I thought you were updating a task, not adding a new one. In that case, my recommendation makes no sense. You've already looked at the server logs, so all I can suggest is to open a ticket with Adobe. Sorry!

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC