Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ColdFusion 2018 - CFSCHEDULE not adding task

Enthusiast ,
Mar 07, 2019 Mar 07, 2019

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

TOPICS
Server administration
2.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Mar 09, 2019 Mar 09, 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.

Translate
Community Expert ,
Mar 07, 2019 Mar 07, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 08, 2019 Mar 08, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2019 Mar 08, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 08, 2019 Mar 08, 2019

Ticket opened with Adobe, will share feedback.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 08, 2019 Mar 08, 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,

^ _ ^

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 08, 2019 Mar 08, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2019 Mar 09, 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')#"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 09, 2019 Mar 09, 2019

Tried that already too, alas no luck.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 09, 2019 Mar 09, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 09, 2019 Mar 09, 2019

tribule  wrote

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.

Ah, tribule, thanks for sharing that. Please mark it as the correct solution. It will surely help someone else in future.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Mar 11, 2019 Mar 11, 2019
LATEST

Just to say, CFSCHEDULE is a very unreliable (buggy) tag. If I do an action=delete at the bottom of a template, say after a CFMAIL, it fails. But, if I do it at the top of a template, it works. These sort of behaviours need to be fixed by Adobe. As for action=create, this does not work at all for me on 2018 Enterprise, even though the docs say it exists. Adobe are getting back to me.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources