Results 1 to 5 of 5

Thread: Spring 3.0 scheduling question

  1. #1
    Join Date
    Sep 2004
    Location
    London
    Posts
    311

    Default Spring 3.0 scheduling question

    Hi all
    i am using Spring 3.0 scheduling capabilities to schedule my task this way:

    Code:
    <task:scheduled-tasks scheduler="myScheduler">
            <task:scheduled ref="shareScheduler" method="fetchLatestPrices" cron="00 00 19 * * *"/>
            <task:scheduled ref="shareScheduler" method="runPortfolioReport" cron="00 47 16 * * *"/>
        </task:scheduled-tasks>
    now suppose i start my PC ( a laptop) at 8 pm.. then both the tasks won't be scheduled to run

    I was wondering if there is a way to configure spring scheduling so that i can recover from that.
    I know if i use Quartz, i can use perisistent triggers so taht if the trigger didn't fire (because i started the PC too late), as soon as i start the PC, the scheduled job will run

    Are there any way i can achieve the same thing using Spring-SCheduling?

    w/kindest regards
    marco

  2. #2
    Join Date
    Dec 2011
    Posts
    3

    Default

    how to do dynamic cron scheduling based on user input parameters from UI ie date,even i can store the input given by user in db.

    please let me know the steps/code snippets to do it

  3. #3
    Join Date
    Dec 2009
    Location
    India
    Posts
    108

    Default

    @MmarcoM,

    I don't think its feasible to do via SPRING only. As you rightfully said yourself, Quartz is reqd. for this kinda requirement.

    @mnsmcn,

    You can use any expression
    #{@yourBean.yourProperty}
    for cron attribute or if you want to pick this value from property file, use this
    ${prop.name.in.file}

  4. #4
    Join Date
    Dec 2011
    Posts
    3

    Default

    Hi All,
    Even i will use quartz for scheduling but as i am new to it i am unaware abt spring concepts.

    In my scenario user would select list of dates based on which i need to generate report.

    Please can you let me know how to progress.

    regards
    anish

  5. #5
    Join Date
    Dec 2011
    Posts
    3

    Default

    Hi All,
    Even i will use quartz for scheduling but as i am new to it i am unaware abt spring concepts.

    In my scenario user would select list of dates based on which i need to generate report.
    Every time user selects differnt dates.

    Please can you let me know how to progress.

    regards
    anish

Posting Permissions

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