Skip to main content
Legend
Mar 7, 2019 5:42 PM UTC
Answered

ColdFusion 2018 - CFSCHEDULE not adding task

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 is closed to new replies. Start a new post to keep the conversation going.
tribuleCorrect answer
Legend
Mar 9, 2019 6:39 PM UTC

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.

11 replies

BKBK
Community Expert
Community Expert
Mar 9, 2019 4:39 PM UTC

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')#"

Translate
tribuleAuthor
Legend
Mar 9, 2019 6:04 PM UTC

Tried that already too, alas no luck.

Translate
tribuleAuthorCorrect answer
Legend
Mar 9, 2019 6:39 PM UTC

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.

Translate
WolfShade
Legend
Mar 8, 2019 10:16 PM UTC

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,

^ _ ^

Translate
tribuleAuthor
Legend
Mar 9, 2019 7:14 AM UTC

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?

Translate
tribuleAuthor
Legend
Mar 8, 2019 9:19 PM UTC

Ticket opened with Adobe, will share feedback.

Translate
Community Expert
Mar 7, 2019 8:15 PM UTC

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

Translate
Dave Watts, Eidolon LLC
tribuleAuthor
Legend
Mar 8, 2019 10:46 AM UTC

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.

Translate
Community Expert
Mar 8, 2019 3:28 PM UTC

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

Translate
Dave Watts, Eidolon LLC