2

We have recently began migrating to ColdFusion 2018 Enterprise, but have found that the scheduled tasks do not work. Although the relevant cfm file works if run in the browser on the same server, if we try and run it as a scheduled tasks then it does not work (although it will say it has run successfully on the screen).

The log file just contains a single line for each run:

Information","DefaultQuartzScheduler_Worker-5","11/20/20","12:48:18","","Task default.takename triggered."

From what I understand there should be additional lines for the http request etc, however.

We have tried various usernames and passwords, including admin accounts to make sure it is not a permissions issue but nothing seems to make any difference.

We have also tried outputting to a file but nothing ever populates the file, although it does update the file's modified date with the date/time the tasks ran (or create a new file if necessary).

Does anyone have any experience with this type of problem?

Miguel-F
  • 13,450
  • 6
  • 38
  • 63
jj2
  • 916
  • 1
  • 8
  • 19
  • 1
    Couple of comments; _From what I understand there should be additional lines for the http request_ it will only log these if you have enabled the logging in the administrator. _We have also tried outputting to a file but nothing ever populates the file_ scheduled tasks will only write output if you are writing output from the template that is being run. If it does not output anything then the logfile will be empty. Add some debugging/output lines to the template and see if you can narrow down the issue. – Miguel-F Nov 20 '20 at 13:27
  • 1
    I have faced an issue before when the saved username and password get populated in the username/password fields in the scheduled task edit page. If we a username/password when it is not needed schedule task will break. Also show that it was run successfully in the logs. So you might want to make sure these fields are empty. [image](https://i.stack.imgur.com/BWU4v.png) – rrk Nov 20 '20 at 15:32
  • @Miguel-F, thank you, I have enabled logging in the administrator but I am only getting one extra line: [test] Executing because of user request at Mon Nov 23 09:42:02 AEDT 2020 – jj2 Nov 22 '20 at 22:44
  • 1
    @rrk, I tried removing the username and password but unfortunately it doesn't seem to make any difference. – jj2 Nov 22 '20 at 22:46
  • @Miguel, have your tried running your task's URL from a browser on the host server? I've experienced similar CF Task Scheduler behavior because of network loopback issues on the host server. – Jason Holden Nov 23 '20 at 17:29

1 Answers1

1

This ended up being an IIS permissions issue. We resolved it by enabling anonymous authentication for both the directory that the relevant cfm files are contained in, as well as the "jakarta" directory that I believe ColdFusion uses for some integration requirements. Scheduled tasks then ran as expected.

jj2
  • 916
  • 1
  • 8
  • 19