Copy link to clipboard
Copied
On my server, I've got a few scheduled tasks set up. Yesterday, after a while, I wanted one of the tasks to run at a different time. After doing the edits and clicking the "Submit Changes" button, I got this error:
Invalid extension of the file name. Valid extensions are :log,txt
Didn't have this issue before, so I am not sure what's causing it.
Here are the server details:
While we await your news of trying what I proposed (which is far simpler than what BKBK proposed after that), I'll add that I've since confirmed that it was in fact CF11 which implemented the change that required if any scheduled task was set to "publish" or "save output to a file", the extension must end with txt or log.
I bring this up first to say that your issue really can't seem to be related to your having done the CF update. (I realize you said that you didn't think you'd clicked that "
...Copy link to clipboard
Copied
There are a couple issues here. First, the fact that you get that error is because the task you're
editing is trying to "publish its output" to a file. See the settings within the task in the cf admin.
And the fact that you're getting the error about its file extension suggests that your cf2021 had not been updated in quite a while. A previous release forced that file to have one of those two extensions.
So your first step is to edit that setting to name a different file extension.
But then you will hit a NEW issue that's specific to this latest May 2025 update, which is update 20 for cf2021. It implements yet another security improvement that requires specifically whirelisting the path to that file in the new pathfilter.jsonnfile. For more, see the blue box under the code sample offered in the section labeled "Pathfilter changes".
Finally, folks applying these May 2025 cf updates should also see a related point BEFORE doing the update, as covered in a point in the "known issues" section, in the bullet starting with the sentence, "After installing the update, the scheduled tasks configured with the Save output to a file option enabled may be removed from the neo-cron.xml configuration file...."
[As a clarification, when I FIRST replied I thought you'd hit that second or third problem, the third of which is so lamentable when it happens unexpectedly. I've now corrected this reply to address your issue as my first point here.]
Copy link to clipboard
Copied
Thank you for the detailed explanation. I'm confused, as I had never checked the Publish checkbox. The script has the extension .cfm though.
In my script there is this line:
writelog( file="myfile", text="starting myfile.cfm" );
Could that be the issue?
Copy link to clipboard
Copied
Nope, the mechanism is not assessing what code is in the url being called in the task, if that's what you mean by "the script" doing that writelog. 🙂
So when you say you "had never checked the Publish checkbox", the simple question now is whether that BOX IS checked as you view the task. If it is, and you don't care to have the task's output saved, then just uncheck it and you're done.
(To be clear, the update would NOT have somehow caused cf to now make the task now publish its output. Indeed, the 3rd issue above new to the May update literally REMOVES any tasks that publish output, if not whitelisted in that pathfilter.json file first.)
Let us know how it goes.
Copy link to clipboard
Copied
While we await your news of trying what I proposed (which is far simpler than what BKBK proposed after that), I'll add that I've since confirmed that it was in fact CF11 which implemented the change that required if any scheduled task was set to "publish" or "save output to a file", the extension must end with txt or log.
I bring this up first to say that your issue really can't seem to be related to your having done the CF update. (I realize you said that you didn't think you'd clicked that "publish" option for your task. Again, uncheck it in that case and proceed with your desuired update.)
But second, in case any future readers may find this and wonder how to control that set of choices of log,txt (as shown in the CF admin error mesage you quoted), that actually CAN be controlled via a setting in the neo-cron.xml (such as in CF's cfusion/lib, or [instancename]/lib for those running more than one), where one will find a setting:
<string>log,txt</string>
Copy link to clipboard
Copied
Thank you so much for your help.
Copy link to clipboard
Copied
@Junaid32092262a1i8 , I am glad to hear that the problem has been solved. You received a number of suggestions from Charlie, so could you please share the specific suggestion(s) that solved the problem. This will help someone else in future.
Copy link to clipboard
Copied
Please share the entire stacktrace of the error. Review ColdFusion's logs and you should find the stacktrace.
On second thoughts, the message "Invalid extension of the file name. Valid extensions are :log,txt" might just be validation feedback of the scheduled-task interface in the Administrator. In which case, it will not percolate down to the logs.
Suggestions:
<var name='publish'>
<boolean value='false'/>
</var>​
writelog( file="myfile", text="starting myfile.cfm" );​
"schedulerexecutionpaths": "opt/coldfusion2021/cfusion/logs/**"​
Find more inspiration, events, and resources on the new Adobe Community
Explore Now