Skip to main content
Known Participant
November 15, 2010
Question

Help with CF schedule task

  • November 15, 2010
  • 5 replies
  • 5766 views

Hi, this is my first time trying to schedule my app to be run using cf schedule task. And I just want to be certain before I create this task.

This task should be run automatically every night at certain time. If I missed one night there will be hundreds of records un-verified and skipped, this is no good.

My application has been tested manually several times and gave good and satisfactory results. Tonight I need to start let it run by itself using Cf schedule task and I'm a little nervous.

I just want to make sure if the username and password listed in CF schedule task meant for the database access? am I right?

Thanks

This topic has been closed for replies.

5 replies

aleckenAuthor
Known Participant
November 19, 2010

I need to post this question back to the forum community, First of all thank you for all the sugesstions, it is much appreciated. But my schedule task did not run as it was expected. From the time I posted this question to today, my little app. has never been run through the scheduled task. I've been running it manually every morning.

I'm not sure what caused it, there is no error message on the CF admin application log and I have moved my little app. to a non https site.

With no error log I don't know what to fix or do. But a couple of questions I have and may need some help from this forum are:

1. My app. resides inside a password protected intranet app.

    So, my little app. that needs to run every early morning is a stand alone app., does not depend on any other app., but it is placed inside a bigger intranet app

    that is password protected.

    When I run this app. manually, I have to login to that app. first, then type in the url/apth into my little app. and press enter on my keyboard

    Is it possible that this login/password page is preventing the schedule task from running as scheduled????

    If so, how can I get around this?

2. On the schedule task GUI, there is a RUN and PAUSE icons. Do I have to do something with it? should I click on RUN in order to start a schedule task?

    Currently it looks like this (see image below). There is an exclamation sign on the RUN button (the 1st button on the left), does it mean something?

    In addition, the 2nd button from the left is the pause button and it is currently RED. Does it mean I have to click it? If I click this button turns green but I

    thought it should be left RED since it indicates that the shecdule task is currently not on paused mode. Please help!

   

Participant
November 19, 2010

According to what you're showing, the task should run.

The first icon is a way for you to manually run the scheduled task.  You can do that right from there and see if it ran, see what the results are.  If you click the Pause Scheduled Task, the task will not run at the scheduled time.

If you go to the logging settings, check the box adjacent to "enable logging for scheduled tasks" - then there will be a log in the Log Files area of the administrator called "scheduler.log" - that should help you track what's going on.

Good luck.

Inspiring
November 15, 2010

And, this username/password attribute pair comes in handy particularly when your Schedule task URL is protected for some security reasons.

ilssac
Inspiring
November 15, 2010

The biggest risk to a ColdFusion scheduled task, is Windows Integrated Security configured on an IIS web server.  When this is configured, ColdFusion URL's will usually work just fine when run by a human user logged into a windows domain on a windows os usually using a windows browser.

But ColdFusion is not a windows client and is not logged into a windows domain by default.  Thus it can never respond to the IIS Windows Integrated Security http requests.

The trick is to configure the ColdFusion files that are expected to be ran with a ColdFusion secheduled task to not be secured with Windows Integrated Security which can be configured for individual files and|or directories.

aleckenAuthor
Known Participant
November 15, 2010

I'm confused.

My CF app. is running under Unix not windows and it is running under https not httpAre there things I or the appropriate department need to do in order to make my schedule task working?

As far as username/password, my department only has 1 of them. No other username/password for accessing CF admin/server

ilssac
Inspiring
November 15, 2010

alecken wrote:

I'm confused.

My CF app. is running under Unix not windows

Then you are VERY unlikely to be using Windows Integrated Security   So, no need to worry about that.

alecken wrote:

it is running under https not http  Are there things I or the appropriate department need to do in order to make my schedule task working?

You MAY (I am not sure for Scheduled tasks) need to import the security certificate into the Java Key Store.  I know you have to do this when using ColdFusion features like <cfhttp...> to connect to https resources.

An Internet search for ColdFusion Java Key Store should turn up several blogs and knowledge base articles that give good step by step instructions.

ilssac
Inspiring
November 15, 2010

As previously stated, NOPE that username and password field have nothing to do with database accounts.

I'm not sure about using them for ColdFusion Sandbox security, I've never heard that, but I also have never used the Sandbox feature of ColdFusion.

But, they can also be used for web server security, IF the web site is configured to use BASIC security.  Which does not happen very often in my experience.

Inspiring
November 15, 2010

Nope!.. It denotes the users that you can configure as part of ColdFusion sandboxes, you can allow/deny certain access to these users through your ColdFusion administrator => Security => User Manager.

So, with respect to schedule tasks, the username/password denotes the ColdFusion user (under whom's account you want to perform the schedule task).

HTH