blob: e1a0675d441a4c56c409cd571983ec477943b73e [file] [log] [blame]
<?xml version="1.0"?>
<xconf xpath="/cocoon" unless="component[@role='org.apache.cocoon.components.cron.JobScheduler']">
<component role="org.apache.cocoon.components.cron.JobScheduler"
class="org.apache.cocoon.components.cron.QuartzJobScheduler"
logger="cron">
<!-- Definitions for a thread pool used to schedule jobs -->
<thread-pool>
<!-- Should we queue up execution requests if the pool is busy? Defaults to false -->
<use-queueing>false</use-queueing>
<!-- How big should the queue be. Defaults to unlimited size (<0 == default) -->
<queue-size>-1</queue-size>
<!-- The maximum size of the pool. Defaults to Integer.MAX_VALUE (<0 == default) -->
<max-pool-size>-1</max-pool-size>
<!-- The minimum size of the pool.Defaults to 1 (<0 == default) -->
<min-pool-size>1</min-pool-size>
<!-- How long will an idle thread be kept before it will be discarded.
Defaults to 60000ms (<0 == default) -->
<keep-alive-time-ms>60000</keep-alive-time-ms>
<!-- Which blocking policy should be used if the maximum pool size and queue size is bounded:
Run: (default) The thread making the execute request runs the task itself.
This policy helps guard against lockup.
Wait: Wait until a thread becomes available.
Abort: Throw a RuntimeException
Discard: Throw away the current request and return.
DiscardOldest: Throw away the oldest request and return. -->
<block-policy>RUN</block-policy>
<!-- Should queued and running jobs be given a chance to finished on system shutdown. Defaults to true -->
<shutdown-graceful>true</shutdown-graceful>
<!-- The maximum time to wait for running jobs to complete. Defaults to unlimited time (<0 == default) -->
<shutdown-wait-time-ms>5000</shutdown-wait-time-ms>
</thread-pool>
<!-- Definintions of triggers -->
<triggers>
<!-- Sample definition of a trigger -->
<!-- A trigger element has the following attributes:
name: A name for the trigger. Mandatory
target: A role name to lookup the job object in the ServiceManager. Mandatory
concurrent-runs: Is it allowed to reschedule a job even if the previous one is
still running. Optionl, defaults to true.
A trigger element has the following child elements:
cron: A string expression defining the scheduling timing.
Optional. If not specified the following elements are explored:
seconds: A string expression for the secods part of a cron expression.
minutes: A string expression for the secods part of a cron expression.
hours: A string expression for the secods part of a cron expression.
days: A string expression for the secods part of a cron expression.
month: A string expression for the secods part of a cron expression.
weekdays: A string expression for the secods part of a cron expression.
years: A string expression for the secods part of a cron expression.
For detailed information about the expressions look at the documentation
-->
<!--
<trigger name="test-job1"
target="org.apache.cocoon.components.cron.CronJob/test"
concurrent-runs="false">
<cron>*/12 * * * * ? *</cron>
</trigger>
<trigger name="test-job2"
target="org.apache.cocoon.components.cron.CronJob/test"
concurrent-runs="true">
<seconds>*/12</seconds>
<minutes>*/5</minutes>
<hours>8,10,12,14,16,18</hours>
<days>?</days>
<months>*</months>
<weekdays>SUN-FRI</weekdays>
</trigger>
-->
</triggers>
</component>
<!-- sample definition of cron job -->
<component role="org.apache.cocoon.components.cron.CronJob/test"
class="org.apache.cocoon.components.cron.TestCronJob"
logger="cron.test">
<msg>I'm here</msg>
<sleep>23000</sleep>
</component>
</xconf>