You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Closed) (JIRA)" <ji...@apache.org> on 2012/02/07 15:52:59 UTC

[jira] [Closed] (SLING-2375) Allow Immediate And Then Periodic Task Execution In Whiteboard Scheduling

     [ https://issues.apache.org/jira/browse/SLING-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler closed SLING-2375.
-----------------------------------

    
> Allow Immediate And Then Periodic Task Execution In Whiteboard Scheduling
> -------------------------------------------------------------------------
>
>                 Key: SLING-2375
>                 URL: https://issues.apache.org/jira/browse/SLING-2375
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>    Affects Versions: Commons Scheduler 2.3.2
>            Reporter: Dominique Jäggi
>            Assignee: Carsten Ziegeler
>             Fix For: Commons Scheduler 2.3.4
>
>
> currently the whiteboard pattern allows creation of scheduled tasks as such:
>             Dictionary<String, Object> props = new Hashtable<String, Object>();
>             props.put("scheduler.period", pc.getInterval());
>             props.put("scheduler.concurrent", false);
>             props.put("scheduler.name", pc.getSource());
>             props.put(Constants.SERVICE_DESCRIPTION, pc.toString());
>             Runnable task = new Runnable() {
>                 final PollConfig pollConfig = pc;
>                 public void run() {
>                     importData(pollConfig);
>                 }
>             };
>             pc.setScheduledTask(context.getBundleContext().registerService(
>                 Runnable.class.getName(), task, props));
> nevertheless, it is not possible via the whiteboard pattern to execute a task immediately upon scheduling and henceforth in the interval defined in the scheduler.period property.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira