Update CF10 Scheduled Tasks Manually Rather than by Admin Console

Here’s the situation. I went to Scheduled Tasks in CF Admin and was confronted with the following error….

The following information is meant for the website developer for debugging purposes.

Error Occurred While Processing Request

The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.

Null Pointers are another name for undefined values.

 The error occurred in scheduletasks.cfm: line 188

-1 : Unable to display error’s location in a CFML template.

The cause of this turned out to be a corrupted neo-cron.xml file found in the cfusion/libs folder. In fact, it was completely empty.

When faced with this issue, you can do one of the following to resolve. Be sure to restart services after each option.

#1 – Recover with BAK

There may be a neo-cron.bak file. You could try replacing the contents of neo-cron.xml with the contents of this file. The benefit of this is it may save your scheduled task descriptions. Retrieving a version from another server may be another option, if you’re in a multiple-server environment.

#2 – Start Over

The XML is actually a WDDX file, so replacing it with a bare-bones file will at least get you going again. You will have to define each scheduled task again.

<wddxPacket version=’1.0′><header/><data><array length=’4′><struct type=’coldfusion.server.ConfigMap’></struct><boolean value=’false’/><string></string><string>log,txt</string></array></data></wddxPacket>

Applying 2d Transitions with jQuery (w/o addClass)

Problem: For my company, FrogQuest, users send images of photo “quests” that they’ve completed as part of the photo scavenger hunt which I review and validate. Oftentimes, these images are sideways or upside down. Part of the admin form is an <input type=”number”> box which takes values incremented by 90 degrees. When I submit the form, I use ColdFusion’s ImageRotate() method to reorient the image, but the problem is I never actually get to see the image oriented correctly until after I’ve submitted it. Sometimes, the solution is so obvious that you don’t ever consider it, which was my problem this time. I was so focused on trying to figure out how to use ImageRotate() to dynamically rotate the image then send it back to the browser in real time that I never even considered a CSS solution. But yesterday, I had an ah-ha moment, then today I worked through the solution but it wasn’t as straight forward as I thought it would be.

Failed Attempts: I began by trying and failing with various tactics…

var element$ = $(“#photo-submission”),
deg$ = $(this).val();
// examples below plug in here

I tried and FAILED using animate()

//FAIL: transform: rotate(180)
//FAIL: -webkit-transform:rotate(180deg); // Uncaught SyntaxError: Unexpected token –

I tried and FAILED using css()

//FAIL: “-webkit-transform”, “rotate(180)”
//FAIL: “-webkit-transform”, “rotate(180deg)”
//FAIL: { -webkit-transform:rotate(180deg) } // Uncaught SyntaxError: Unexpected token –
//FAIL: { webkit-transform:rotate(180deg) } // Uncaught SyntaxError: Unexpected identifier

The Solution:

Finally, I stumbled upon a SUCCESSFUL solution using attr()…

“style”, “-webkit-transform:rotate(“+ deg$ +”deg);”

This code adds a “style” element to the img tag with a rotation value equal to the form’s value. Though the image rotates as expected, I still have some work to do because the image doesn’t resize to fill it’s container. But for now, it’s functional and the initial problem is solved. Now to ponder the next issue for a while.

Accessing Query Row Index (CurrentRow)

It’s not something I use often, and when I do, I always have to research it again. So, I figured I might as well document it and make it easy on myself next time.

When looping through a query, rather than setup a counter and increment, I find it more convenient to simply use the query row index (CurrentRow). Here’s how it works…

&lt;cfoutput query="someQuery"&gt;
        &lt;li&gt;#CurrentRow# the number of the ordered list and the number for variable CurrentRow should match.&lt;/li&gt;
Back to top