Skip to main content
Inspiring
October 29, 2013
Question

Strange Scheduled Task (Quartz) behaviour CF10

  • October 29, 2013
  • 4 replies
  • 10252 views

Hi,

I'm running ColdFusion 10 Enterprise on a RHEL 6 server and have come across an intersting behaviour in relation to the scheduled tasks we have setup.

We noticed that after a reboot of our ColdFusion server that the scheduled tasks weren't running correctly.

When I looked in the http.log file I could see that it was trying to execute the correct template

"Information","DefaultQuartzScheduler_Worker-9","10/25/13","07:18:16",,"Starting HTTP request {URL='...', method='get'}"

But the request never appears to be completed. When a task successfully runs you would expect to see a completed line as well in the http.log file

"Information","DefaultQuartzScheduler_Worker-9","10/25/13","07:18:21",,"HTTP request completed  {Status Code=200 ,Time taken=4896 ms}"

For some reason after the server reboot the task is triggered, but it never runs and never shows as being complete.

I was playing changing settings in the scheduled task and checked the Save output to a file

One other thing I noticed was that the catalina task (check for update/hotfix) would execute and return while the other tasks (quartz) wouldn't.


Has anyone seen anything similar or have any suggestions? For now i'll just make sure my tasks all output to a file, but if there was a way to fix it I would much prefer to do that.

Thanks

Simon

This topic has been closed for replies.

4 replies

Inspiring
October 13, 2017

In my case the scheduled task run twice within some milliseconds (sometimes the exact millisecond!)

Then I logged IP number and the duplet tasks was run from another IP.

Turned out our internet service provider had some redundat server set up that had kicked in, and somehow the CF instance continued to run, even after our primary server kicked in again.

I put this code in some of my scheduled task, that really helped me!

<cflog file="myTasks" text="#GetCurrentTemplatePath()# Tickcount:#GetTickCount()# userAgent:#cgi.HTTP_USER_AGENT# IP:#cgi.REMOTE_ADDR#">

Then you go to CF Admin and find your myTasks.log at "Log files". Check that IP

New Participant
June 25, 2015

Hi All,

I didn't take the time to read everyone's response in here, but here's the deal:  On windows servers CF10 has a major bug in the cron job stuff - ie, scheduled tasks.  If you name your task with a space or a dash or anything other than a..z it will corrupt the file.  Once corrupted, it takes nigh an act of God to get it back working.  To do that, you must turn off coldfusion - the service MUST be stopped.  Then you can edit the neo-cron.xml file and remove everything but the top and bottom part of it with the length=4 stuff and inside that block clear it all out.  (essentially a baseline xml file).  Once that is done (and cf is still OFF), delete the neo-cron.bak file if it exists.  You will now only have your new clean neo-cron.xml file in there.  Start the cf service.  You should now be able to get back into CF Admin.  If you go to the scheduled tasks page and you get an error, then your "clean" version of your neo-cron.xml file isn't correct.  Stop CF, edit, Start & test.  Then, tell everyone not to ever put any tasks or group names in there with spaces and such.  I basically name my tasks:  ClientNameGenerateSiteMap for example. Seriously, Adobe, how did this get past your testing?  Such an obvious bug.  (bug not solution).


Good luck. 

BCfromMD
New Participant
May 12, 2015

Simon,

I’m quite a bit late to this post, but my organization had what appeared to be the same issue that you were experiencing. We were specifying the proxy server and port on each of our scheduled tasks. They would work fine until either the ColdFusion service was restarted or the server was restarted. Once that happened, none of our jobs would run. We would then go into each job manually – like you – and submit the jobs and they would begin to run fine. That is, until the next restart.

What we discovered to correct this is a simple fix. Go into ColdFusion Administrator and under Server Settings/Java and JVM, you will see an area called JVM Arguments. You need to add the following to the arguments:

-Dhttp.proxyHost=111.222.333.444

-Dhttp.proxyPort=1234

Make sure that you don’t forget the beginning dash and you put in your server’s IP address and port. Save the settings and restart the ColdFusion service.

I hope this helps someone – it took quite a while to figure this one out.

Barry

October 30, 2013

Hi

I have seen something very similar to this. However, in my case the reason seems to be that CF10 does not obey HTTP proxy commands via jvm.config. You have to specifically set your proxy server for every scheduled task.

Also, I noticed that the scheduled tasks screen will not work correctly in CFIDE if you access it from an external IP address, even if you enable that IP address to have CFAdmin access.

raZorTTZAuthor
Inspiring
November 1, 2013

Hi Pat

I had a similar problem with tasks needing the proxy address and port added to them.

Out of interest what were the arguments you tried in the jvm config for the proxy?

Cheers,

Simon

Charlie Arehart
Adobe Expert
January 27, 2015

Hi Mike,


no unfortunately I was never able to get to the bottom of the issue.

Someone from Adobe contacted me initially after I raised an issue, but they never got back to me.

I ended up having to set the tasks up to run off internal URLs so that the proxy server wasn't involved.

Cheers,

Simon


@Simon (and Mike), I know Simon you’ve moved on, but to help Mike and others reading this a year later, are you still saying the issue is that when a schedule task starts to run (as scheduled), you see the http log start the request but never finish it? And do you further confirm that if you use the CF Admin page to trigger the task, it works fine? Finally, are you confirming that this is only with URLs that go through a proxy, but those that don’t run no problem whether scheduled or triggered manually?

Mike, that’s what I understand Simon’s first notes (from 2013) to say. When you say you are dealing with something “very similar”, is it similar to that? Or some other facet of a non-working scheduled task?

And Simon was reporting this about CF10 then. Mike, is that what you’re running, too? And for either of you (Simon, if you still care to consider possibilities), can you confirm what update of CF10 (or 11) you are on, in case that may be significant?

/charlie

/Charlie (troubleshooter, carehart. org)