Reputation: 9140
Now this might be a very vague question but how reliable are scheduled tasks? For example if I setup a task to do something everyday at 3pm, and assuming there are no errors in the code, will ColdFusion always make sure it runs 3pm everyday?
Upvotes: 3
Views: 1898
Reputation: 1985
From my experience, they are extremely reliable.
How to Tell if the Task Ran:
For Railo server, one way to see if the task ran or get an idea of status of the task is to check the "scheduler.log". This is normally found in the /WEB-INF/railo/logs directory. Here you can see if the task executed or not, if it timed out, etc.
For CF server, you can set an array of scheduled tasks by creating an object as shown below, then just loop through or cfdump it:
<cfset arySchedTasks = createobject("java","coldfusion.server.ServiceFactory").getCronService().listall() />
Upvotes: 0
Reputation: 2019
I will say YES it will run at every 3:00 PM if it is schedule and your COLDFUSION server is RUNNING (really important ;) ). I use it lot. Almost 25 schedules in one of my project to generate daily report and email statistics. On schedule pages make sure your page doesn't timed out as this error will not catch by ColdFusion onError method if you are logging/sending email on error either you will never know that script wasn't run properly.
Upvotes: 4
Reputation: 12446
We used to use scheduled tasks to run stuff weekly, daily, hourly and per minute and per second. The run per less than minute we had to hack the neo-cron.xml
file and overall it worked very well until ColdFusion 9.0.1 - see here - and then we had to move out tasks that ran more frequently than once a minute to another scheduler.
We decided on VisualCron and haven't looked back. Unlike CF scheduling, VisualCron allow us run command line tasks rather then only hitting a URL which can be unnecessary sometimes.
CF10 is apparently coming with big changes to the scheduled task engine, so it should be interesting to see what they improve. But for tasks with intervals greater than one minute the current CF scheduling engine is very reliable.
Hope that helps!
Upvotes: 4
Reputation: 13797
CF will always run when you setup your schedule task no matter it catch error. It means, next schedule task will be run as interval time when the previous task caught error.
Upvotes: 1
Reputation: 4758
From my experience they are very reliable. We use them for many automated tasks that run daily and weekly. Have never let us down.
As a check, add an email in the programs, so that if you get your daily email, you know the scheduled task ran. If not something went wrong, but unless your webserver or coldfusion stop, once its all setup it should be smooth sailing.
Upvotes: 1