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.4
            Reporter: Dominique Jäggi


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


Reply via email to