Rename Scheduled Tasks

Hi Gang,

Is there a specific reason that you cannot rename a scheduled task after creation?


Lucee :

I think the task name is also something like the unique identifier of the schedule: Evey “action” cfschedule does is done by using that name as the unique selector. You’d need to create some kind of function that does an exact copy of the task with the new name and delete the old one in the admin. But before doing it, you must also check whether a task with the same task name doesn’t exist, otherwise it would overwrite it. If not available, that would be an enhancement of the admin.

However, for every new cfml app I create, I would not use the admin for setting schedules anymore. I’d use a component that onApplicationStart checks for schedules on the flyby using the cfschedule task, and create the schedule programatically if these aren’t present. That makes everything more portable and “backup-able”. You also wouldn’t loose any schedule setting if the context gets wiped out because of updates.

1 Like


That is a great idea…
Why I have a bee in my bonnet about documentation…
Do we have a “recommended / best” practices section in the docs?
This is the sort of thing that I think could go in there…
Same with things like setting datasources / mappings in the Application.cfc.

Additionally - things like… Using IIS on Windows… It CAN be done… but unless you have a REAL need to use IIS (as opposed to, “it’s just there, on Windows”… you SHOULD use Apache’s httpd web server… and here is how you do it…

I am guilty of using the admin at the moment for all of these sorts of things - and why I knew you “can” do it in the Application.cfc… the next “thinking / realisation” step of;

makes everything more portable and “backup-able”. You also wouldn’t loose any schedule setting if the context gets wiped out because of updates.

Never occurred to me - even though I have had to manually set all the (many) datasources, (and all their options) and the Application mappings - every time I do a new Lucee install - and with all my recent issues - I have been doing that an awful, lot… It’s quite the eye-opener when you realise how much time / heartache you could have saved yourself - by using the options available.

Even more embarrassing - I really like to think of myself as someone that automates just about everything I can to save overall time / have things consistently repeatable…


It’s important to distinguish between “best practice” and opinion. It’s great that Lucee offers many ways of running it, which suit the preferences/needs of different people in different settings with different experience/skill levels. But the range of options does of course make it harder to document definitively for new comers.


Agreed - My use of “best-practice” was quite loose.
Perhaps a;
Lucee Admin: Tips, section.