Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
And, this username/password attribute pair comes in handy particularly when your Schedule task URL is protected for some security reasons.
Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
If the page in question uses an HTML form to log in, the CF scheduler won't be able to run it. If the page uses web server authentication, CF supports that.
You might modify your environment so that requests made from localhost don't require authentication.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
Read this before you post:
http://forums.adobe.com/thread/607238
Copy link to clipboard
Copied
I tried to follow the last 2 suggestions, I moved my app. to a diff. directory that doesn't require login/password and also enabled the schedule log.
In addition, I also run the schedule task by pressing the RUN icon and it ran just fine, Friday night.
Then I set my schedule task again to run Monday Nov 22 2010 at 5:59 AM (which is this morning)
My app. send out email when the first block of code on my app is ran, this morning I got the email but that's it. It looks like when the app. was triggered, the email got sent out but than it stopped.
There is no error on app. log and the schedule task is shown below. I'm not sure why it is being rescheduled????? and what happened to the rest of my codes?
I have access to Cf admin but that's about it, this machine is locatted at a different dept., and managed my difference IT people. Is there anything I need to inform them about my schedule task or is there anything they need to do on their site?
Here is part of my codes:
<cfinvoke component="MyComp" method="Warning" returnvariable="MyRetValue">
<CFIF #MyRetValue# IS "">
<!--- send out reminder to update the software --->
<CFELSE>
<CFSWITCH expression="#MyRetValue#">
<CFCASE value="None">
<!--- First, clean up these from previous records --->
<cfquery name="ClearPreviousRecords" datasource="ADV">
Truncate Table Table1
Truncate table Table2
Truncate table Table3
</cfquery>
<cfinvoke component="MyComp" method="GetNightlyData">
<cfinclude template="EmailNotification.cfm"> <---------------------------- the schedule task stopped here. the javascript did not get run !
<script>
window.location="addformat.cfm";
</script>
</CFCASE></CFCASE>
<CFCASE value="None">
<!--- Do something else --->
</CFCASE>
etc.....
</CFSWITCH>
Date | Time | Severity | ThreadID | Application Name |
Nov 22, 2010 | 5:59 AM | Information | scheduler-1 | |
[qas_proweb] Rescheduling for :Tue Nov 23 05:59:00 EST 2010 Now: Mon Nov 22 05:59:01 EST 2010 | ||||
Nov 22, 2010 | 5:59 AM | Information | scheduler-1 | |
[qas_proweb] Executing at Mon Nov 22 05:59:00 EST 2010 | ||||
Nov 21, 2010 | 5:59 AM | Information | scheduler-1 | |
[qas_proweb] Executing at Sun Nov 21 05:59:00 EST 2010 | ||||
Nov 21, 2010 | 5:59 AM | Information | scheduler-1 | |
[qas_proweb] Rescheduling for :Mon Nov 22 05:59:00 EST 2010 Now: Sun Nov 21 05:59:00 EST 2010 | ||||
Nov 20, 2010 | 5:59 AM | Information | scheduler-0 | |
[qas_proweb] Executing at Sat Nov 20 05:59:00 EST 2010 | ||||
Nov 20, 2010 | 5:59 AM | Information | scheduler-0 | |
[qas_proweb] Rescheduling for :Sun Nov 21 05:59:00 EST 2010 Now: Sat Nov 20 05:59:00 EST 2010 | ||||
Nov 19, 2010 | 7:21 PM | Information | jrpp-3321 | |
/opt/coldfusion8/logs/scheduler.log initialized | ||||
Nov 19, 2010 | 7:21 PM | Information | jrpp-3321 | |
[qas_proweb] Activating2 on Fri Nov 19 19:21:06 EST 2010 To run on Sat Nov 20 05:59:00 EST 2010 |
Copy link to clipboard
Copied
I believe since the scheduled task is being run by ColdFusion instead of running in a browser, you aren't going to be able to redirect to the other page. Take the code from the page you are trying to redirect to and put it directly in this page...my guess is it will work fine.