SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
-
Dec 1, 2006, 05:22 #1
- Join Date
- Mar 2006
- Posts
- 139
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Information of Tasks pending on the scheduler
Hello all,
Is there any way to get the information of the tasks that are present on the coldfusion scheduler programatically? The main problem is that I don't have the access to the coldfusion administrator.
What I am trying here is to grab the information of all the tasks that are pending on the cf-scheduler i.e. those tasks which didn't run on the pre-specified date and time.
So if there are any tasks that didn't run,I would have to reschedule them such that they run on some other time.
-
Dec 1, 2006, 05:54 #2
- Join Date
- Jul 2005
- Posts
- 609
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You can get some scheduled task data using this:
http://www.coldfusionusers.com/cfblo...heduled-tasks/
Don't remember everything you get, but you might be able to get what you need.
-
Dec 1, 2006, 23:06 #3
- Join Date
- Oct 2006
- Location
- Orange County, CA
- Posts
- 27
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorry PragyaRatna, I don't have the answer to your question but I have a question related to this.
Is there any application or script which will read all of the scheduled task entries in the CF Administrator and generate the code or files to create the same scheduled tasks on another machine?
I could make something based off the cffactory, but I'm sure someone has already done it....
-
Dec 2, 2006, 23:33 #4
- Join Date
- Mar 2006
- Posts
- 139
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks usachrisk for the information.
I used the code as provided on the link above. I am overwhelmed with the number of methods that it returned. I tried to search for information on some of these methods on the coldfusion manual(html version for cf6)..but could find none.
Where can I find documentation or resources on the methods available for the ServiceFactory?
-
Dec 4, 2006, 18:41 #5
- Join Date
- Jul 2005
- Posts
- 609
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Unfortunately not much exists for this in documentation. What exactly are you trying to do?
-
Dec 4, 2006, 22:42 #6
- Join Date
- Mar 2006
- Posts
- 139
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I am currently working on a script which will generate series of scheduled tasks for sending notification emails to the site members. Once the scheduled task is run on a particular date, it deletes itself.
Now, if in case any of those generated scheduled tasks doesn't run on the pre-specified date and time, I would have to reschedule those tasks so that they run on the nearest Saturday at a specific time.
Therefore, I need a way to determine whether or not the list of tasks available on the coldfusion scheduler has run or not.
-
Dec 9, 2006, 04:59 #7
- Join Date
- Jul 2005
- Posts
- 609
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Try this, but do a dump of #alltasks# to see if what you need is there:
http://www.bpurcell.org/blog/index.c...ntry&entry=935
-
Dec 9, 2006, 21:39 #8
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Once you run the code that is listed above (i've also posted it below to make things simpler), this is what you'll probably see:
disabled NO
file [empty string]
http_port 80
http_proxy_port 80
interval ONCE
operation HTTPRequest
password [empty string]
path [empty string]
proxy_server [empty string]
publish NO
request_time_out [empty string]
resolveurl NO
start_date 12/9/2006
start_time 10:00:00 PM
task My schedule
url http://localhost/schedules.cfm
username [empty string]
I created a scheduled task on my local server to see what it looked like.
PHP Code:<cfobject name="cfFactory" type="java" action="create" class="coldfusion.server.ServiceFactory">
<cfset arrServices = cfFactory.cronService.listall()>
<cfdump var="#arrServices#">
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
Bookmarks