Trigger[]

View: New views
2 Messages — Rating Filter:   Alert me  

Trigger[]

by seema-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How do you iterate over triggers after acquiring them using getTriggersOfJob()?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=392734&messageID=479699#479699


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Trigger[]

by seema-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is a quick example that hopefully answers your question.  The API should help provide any more details on the various methods available for a CronTrigger.


      Scheduler sch = StdSchedulerFactory.getDefaultScheduler();
      Trigger[] triggers = sch.getTriggersOfJob(jobName,jobGroup);
      for(Trigger t : triggers)
      {
        if(t instanceof CronTrigger)
        {
          CronTrigger ct = (CronTrigger) t;
          System.out.println("Cron Expression: "+ct.getCronExpression());
        }
      }
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=392734&messageID=497252#497252


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price