SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question 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.

  2. #2
    SitePoint Guru
    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.

  3. #3
    SitePoint Enthusiast
    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....

  4. #4
    SitePoint Zealot
    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?

  5. #5
    SitePoint Guru
    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?

  6. #6
    SitePoint Zealot
    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.

  7. #7
    SitePoint Guru
    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

  8. #8
    SitePoint Wizard creole's Avatar
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •