{
    "componentChunkName": "component---src-templates-doc-tsx",
    "path": "/docs/1.x/en/scheduler-plugin/",
    "result": {"data":{"navigation":{"nodes":[{"section":"Getting started","entries":[{"frontmatter":{"title":"Getting started","subtitle":"How to install and configure SCM-Manager","partiallyActive":null},"fields":{"slug":"/docs/1.x/en/getting-started/"}},{"frontmatter":{"title":"Applicationserver","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/applicationserver/"}},{"frontmatter":{"title":"SCM-Manager on IIS Helicon","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/iis-helicon/"}},{"frontmatter":{"title":"SCM-Server and Nginx","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/nginx/"}},{"frontmatter":{"title":"SCM-Server and Apache mod_jk","subtitle":"Setting up SCM-Manager with Apache Tomcat","partiallyActive":null},"fields":{"slug":"/docs/1.x/en/apache/apache-mod_jk/"}},{"frontmatter":{"title":"SCM-Server and Apache mod_proxy","subtitle":"Setting up SCM-Manager behind a reverse proxy","partiallyActive":null},"fields":{"slug":"/docs/1.x/en/apache/apache-mod_proxy/"}},{"frontmatter":{"title":"Unix Daemons and Windows Services","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/daemons/"}},{"frontmatter":{"title":"Upgrade to a new Version","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/upgrade/"}},{"frontmatter":{"title":"FAQ","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/faq/"}}]},{"section":"Downloads","entries":[{"frontmatter":{"title":"RPM and DEB packages","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/RPM and DEB packages/"}},{"frontmatter":{"title":"Stable","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/download/"}},{"frontmatter":{"title":"Snapshot Releases","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/download-snapshot-release/"}},{"frontmatter":{"title":"Download Archive","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/download-archive/"}}]},{"section":"Release Notes","entries":[{"frontmatter":{"title":"Release Notes 1.60 - 1.40","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/release-notes/"}},{"frontmatter":{"title":"Release Notes 1.39 - 1.20","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/release notes 1.39 - 1.20/"}},{"frontmatter":{"title":"Release Notes 1.19 - 1.0","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/release notes 1.19 - 1.0/"}}]},{"section":"Administration","entries":[{"frontmatter":{"title":"Command line client","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/administration/command-line-client/"}},{"frontmatter":{"title":"SCM-Server SSL","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/administration/scm-server-ssl/"}},{"frontmatter":{"title":"Permissions","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/administration/Permissions/"}},{"frontmatter":{"title":"Revision Control Plugin Comparison","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/administration/rv-plugin-comparison/"}},{"frontmatter":{"title":"Incompatible subversion db format","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/healthchecks/svn-incompatible-dbformat/"}}]},{"section":"Mercurial","entries":[{"frontmatter":{"title":"Cloning an empty repository","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/mercurial/clone-empty/"}},{"frontmatter":{"title":"Push bookmark","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/mercurial/push-bookmark/"}},{"frontmatter":{"title":"Push multiple branches","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/mercurial/push-multiple-branches/"}},{"frontmatter":{"title":"Push multiple branches to new repository","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/mercurial/push-multiple-branches-to-new/"}},{"frontmatter":{"title":"Push single changeset","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/mercurial/push-single-changeset/"}}]},{"section":"Plugins","entries":[{"frontmatter":{"title":"Overview","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/scm-plugins/"}},{"frontmatter":{"title":"Plugin Descriptor","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/plugin-descriptor/"}},{"frontmatter":{"title":"Active Directory Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/active-directory-plugin/"}},{"frontmatter":{"title":"Branch Write Protect Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/branchwp-plugin/"}},{"frontmatter":{"title":"Path Write Protect Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/pathwp-plugin/"}},{"frontmatter":{"title":"Jira Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/jira-plugin/"}},{"frontmatter":{"title":"Mail Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/mail-plugin/"}},{"frontmatter":{"title":"Mantisbt Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/mantisbt-plugin/"}},{"frontmatter":{"title":"Redmine Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/redmine-plugin/"}},{"frontmatter":{"title":"Scheduler Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/scheduler-plugin/"}},{"frontmatter":{"title":"Trac Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/trac-plugin/"}},{"frontmatter":{"title":"Webhook Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/webhook-plugin/"}},{"frontmatter":{"title":"SCM-Jenkins-Plugin","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/jenkins-plugin/"}}]},{"section":"Development","entries":[{"frontmatter":{"title":"Configuring Eclipse","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/configure-eclipse/"}},{"frontmatter":{"title":"Building SCM-Manager from source","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/build-from-source/"}},{"frontmatter":{"title":"Java Client API","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/java-client-api/"}},{"frontmatter":{"title":"Extension Points","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/ExtensionPoints/"}},{"frontmatter":{"title":"Injection Objects","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/injectionObjects/"}}]},{"section":"Examples","entries":[{"frontmatter":{"title":"Screenshots","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/screens/"}},{"frontmatter":{"title":"Code Snippets","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/code-snippets/"}},{"frontmatter":{"title":"Snippet - Authentication","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/snippet-authentication/"}},{"frontmatter":{"title":"Snippet - Extend global configuration","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/snippet-config-group/"}},{"frontmatter":{"title":"Snippet - Extend Navigation","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/snippet-extend-navigation/"}},{"frontmatter":{"title":"Snippet - Add tab to repository configuration","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/snippet-repository-tab/"}},{"frontmatter":{"title":"Mercurial Subrepositories","subtitle":null,"partiallyActive":null},"fields":{"slug":"/docs/1.x/en/subrepositories/"}}]}]},"versions":{"group":[{"fieldValue":"1.0.x"},{"fieldValue":"1.x"},{"fieldValue":"2.0.x"},{"fieldValue":"2.1.x"},{"fieldValue":"2.10.x"},{"fieldValue":"2.11.x"},{"fieldValue":"2.12.x"},{"fieldValue":"2.13.x"},{"fieldValue":"2.14.x"},{"fieldValue":"2.15.x"},{"fieldValue":"2.16.x"},{"fieldValue":"2.17.x"},{"fieldValue":"2.18.x"},{"fieldValue":"2.19.x"},{"fieldValue":"2.2.x"},{"fieldValue":"2.20.x"},{"fieldValue":"2.21.x"},{"fieldValue":"2.22.x"},{"fieldValue":"2.23.x"},{"fieldValue":"2.24.x"},{"fieldValue":"2.25.x"},{"fieldValue":"2.26.x"},{"fieldValue":"2.27.x"},{"fieldValue":"2.28.x"},{"fieldValue":"2.29.x"},{"fieldValue":"2.3.x"},{"fieldValue":"2.30.x"},{"fieldValue":"2.31.x"},{"fieldValue":"2.32.x"},{"fieldValue":"2.33.x"},{"fieldValue":"2.34.x"},{"fieldValue":"2.35.x"},{"fieldValue":"2.36.x"},{"fieldValue":"2.37.x"},{"fieldValue":"2.38.x"},{"fieldValue":"2.39.x"},{"fieldValue":"2.4.x"},{"fieldValue":"2.40.x"},{"fieldValue":"2.41.x"},{"fieldValue":"2.42.x"},{"fieldValue":"2.43.x"},{"fieldValue":"2.44.x"},{"fieldValue":"2.45.x"},{"fieldValue":"2.46.x"},{"fieldValue":"2.47.x"},{"fieldValue":"2.48.x"},{"fieldValue":"2.5.x"},{"fieldValue":"2.6.x"},{"fieldValue":"2.7.x"},{"fieldValue":"2.8.x"},{"fieldValue":"2.9.x"},{"fieldValue":"3.0.x"},{"fieldValue":"3.1.x"},{"fieldValue":"3.10.x"},{"fieldValue":"3.11.x"},{"fieldValue":"3.12.x"},{"fieldValue":"3.2.x"},{"fieldValue":"3.3.x"},{"fieldValue":"3.4.x"},{"fieldValue":"3.5.x"},{"fieldValue":"3.6.x"},{"fieldValue":"3.7.x"},{"fieldValue":"3.8.x"},{"fieldValue":"3.9.x"}]},"languages":{"group":[{"fieldValue":"en"}]},"markdownRemark":{"html":"<p>The scheduler plugin provides an api for other plugins to execute scheduled jobs. The plugin is based on the <a href=\"http://quartz-scheduler.org/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">quartz project</a>.</p>\n<h2 id=\"configuration\" style=\"position:relative;\"><a href=\"#configuration\" aria-label=\"configuration permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Configuration</h2>\n<p>The plugin needs no further configuration.</p>\n<h2 id=\"api-usage\" style=\"position:relative;\"><a href=\"#api-usage\" aria-label=\"api usage permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>API Usage</h2>\n<p>First you have to add the dependency to your pom.xml e.g.:</p>\n<div class=\"gatsby-highlight\" data-language=\"xml\"><pre class=\"language-xml\"><code class=\"language-xml\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>dependency</span><span class=\"token punctuation\">></span></span>\n  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>groupId</span><span class=\"token punctuation\">></span></span>sonia.scm.plugins<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>groupId</span><span class=\"token punctuation\">></span></span>\n  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>artifactId</span><span class=\"token punctuation\">></span></span>scm-scheduler-plugin<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>artifactId</span><span class=\"token punctuation\">></span></span>\n  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>version</span><span class=\"token punctuation\">></span></span>1.0<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>version</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>dependency</span><span class=\"token punctuation\">></span></span></code></pre></div>\n<p>But note you should use at least version 1.22 of scm-plugins as parent for your plugin.</p>\n<p>Now you can get a <a href=\"http://www.quartz-scheduler.org/api/2.0.0/org/quartz/SchedulerFactory.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">SchedulerFactory</a> via injection.</p>\n<p>For Example:</p>\n<div class=\"gatsby-highlight\" data-language=\"java\"><pre class=\"language-java\"><code class=\"language-java\"><span class=\"token keyword\">public</span> <span class=\"token keyword\">class</span> <span class=\"token class-name\">ReportHandler</span> <span class=\"token punctuation\">{</span>\n  \n  <span class=\"token keyword\">private</span> <span class=\"token keyword\">final</span> <span class=\"token class-name\">SchedulerFactory</span> schedulerFactory<span class=\"token punctuation\">;</span>\n \n  <span class=\"token annotation punctuation\">@Inject</span>\n  <span class=\"token keyword\">public</span> <span class=\"token class-name\">ReportContextListener</span><span class=\"token punctuation\">(</span><span class=\"token class-name\">SchedulerFactory</span> schedulerFactory<span class=\"token punctuation\">)</span><span class=\"token punctuation\">{</span>\n    <span class=\"token keyword\">this</span><span class=\"token punctuation\">.</span>schedulerFactory <span class=\"token operator\">=</span> schedulerFactory<span class=\"token punctuation\">;</span>\n  <span class=\"token punctuation\">}</span>\n\n<span class=\"token punctuation\">}</span></code></pre></div>\n<p>With the SchedulerFactory <a href=\"http://www.quartz-scheduler.org/api/2.0.0/org/quartz/SchedulerFactory.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">SchedulerFactory</a> you can schedule <a href=\"http://www.quartz-scheduler.org/api/2.0.0/org/quartz/Job.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Jobs</a>. To simplify the steps to schedule a job, the scm-scheduler-plugin comes with a helper class called Schedulers.</p>\n<h3 id=\"notes\" style=\"position:relative;\"><a href=\"#notes\" aria-label=\"notes permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Notes</h3>\n<ul>\n<li>Schedulers must always be executed by an administrator or in an administrative context. Jobs which are executed by a scheduler are executed with administrator privileges.</li>\n<li>Each job is able to get dependencies via injection.</li>\n</ul>\n<h3 id=\"further-reading\" style=\"position:relative;\"><a href=\"#further-reading\" aria-label=\"further reading permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Further reading</h3>\n<ul>\n<li><a href=\"http://www.quartz-scheduler.org/overview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Quartz Overview</a></li>\n<li><a href=\"http://www.quartz-scheduler.org/documentation/quartz-2.1.x/tutorials/crontrigger\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Quartz Cron Trigger</a></li>\n<li><a href=\"http://www.quartz-scheduler.org/documentation/quartz-2.1.x/examples\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Quartz Examples</a></li>\n</ul>\n<h3 id=\"complete-example\" style=\"position:relative;\"><a href=\"#complete-example\" aria-label=\"complete example permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Complete Example</h3>\n<p>In the following example a ReportJob is executed every minute since the start of scm-manager.</p>\n<div class=\"gatsby-highlight\" data-language=\"java\"><pre class=\"language-java\"><code class=\"language-java\"><span class=\"token annotation punctuation\">@Extension</span>\n<span class=\"token keyword\">public</span> <span class=\"token keyword\">class</span> <span class=\"token class-name\">ReportContextListener</span> <span class=\"token keyword\">implements</span> <span class=\"token class-name\">ServletContextListener</span> <span class=\"token punctuation\">{</span>\n  \n  <span class=\"token keyword\">private</span> <span class=\"token keyword\">final</span> <span class=\"token class-name\">AdministrationContext</span> adminContext<span class=\"token punctuation\">;</span>\n  <span class=\"token keyword\">private</span> <span class=\"token keyword\">final</span> <span class=\"token class-name\">SchedulerFactory</span> schedulerFactory<span class=\"token punctuation\">;</span>\n \n  <span class=\"token annotation punctuation\">@Inject</span>\n  <span class=\"token keyword\">public</span> <span class=\"token class-name\">ReportContextListener</span><span class=\"token punctuation\">(</span><span class=\"token class-name\">AdministrationContext</span> adminContext<span class=\"token punctuation\">,</span>\n                               <span class=\"token class-name\">SchedulerFactory</span> schedulerFactory<span class=\"token punctuation\">)</span><span class=\"token punctuation\">{</span>\n    <span class=\"token keyword\">this</span><span class=\"token punctuation\">.</span>adminContext <span class=\"token operator\">=</span> adminContext<span class=\"token punctuation\">;</span>\n    <span class=\"token keyword\">this</span><span class=\"token punctuation\">.</span>schedulerFactory <span class=\"token operator\">=</span> schedulerFactory<span class=\"token punctuation\">;</span>\n  <span class=\"token punctuation\">}</span>\n \n  <span class=\"token annotation punctuation\">@Override</span>\n  <span class=\"token keyword\">public</span> <span class=\"token keyword\">void</span> <span class=\"token function\">contextDestroyed</span><span class=\"token punctuation\">(</span><span class=\"token class-name\">ServletContextEvent</span> sce<span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span><span class=\"token punctuation\">}</span>\n \n  <span class=\"token annotation punctuation\">@Override</span>\n  <span class=\"token keyword\">public</span> <span class=\"token keyword\">void</span> <span class=\"token function\">contextInitialized</span><span class=\"token punctuation\">(</span><span class=\"token class-name\">ServletContextEvent</span> sce<span class=\"token punctuation\">)</span><span class=\"token punctuation\">{</span>\n    <span class=\"token class-name\">Schedulers</span><span class=\"token punctuation\">.</span><span class=\"token function\">schedule</span><span class=\"token punctuation\">(</span>adminContext<span class=\"token punctuation\">,</span> schedulerFactory<span class=\"token punctuation\">,</span> \n      <span class=\"token class-name\">SimpleScheduleBuilder</span><span class=\"token punctuation\">.</span><span class=\"token function\">repeatMinutelyForever</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span> <span class=\"token class-name\">ReportJob</span><span class=\"token punctuation\">.</span><span class=\"token keyword\">class</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n  <span class=\"token punctuation\">}</span>\n  \n  <span class=\"token keyword\">private</span> <span class=\"token keyword\">static</span> <span class=\"token keyword\">class</span> <span class=\"token class-name\">ReportJob</span> <span class=\"token keyword\">implements</span> <span class=\"token class-name\">Job</span> <span class=\"token punctuation\">{</span>\n    \n    <span class=\"token annotation punctuation\">@Override</span>\n    <span class=\"token keyword\">public</span> <span class=\"token keyword\">void</span> <span class=\"token function\">execute</span><span class=\"token punctuation\">(</span><span class=\"token class-name\">JobExecutionContext</span> context<span class=\"token punctuation\">)</span> <span class=\"token keyword\">throws</span> <span class=\"token class-name\">JobExecutionException</span> <span class=\"token punctuation\">{</span>\n      <span class=\"token comment\">// do something minutely</span>\n      <span class=\"token class-name\">System</span><span class=\"token punctuation\">.</span>out<span class=\"token punctuation\">.</span><span class=\"token function\">println</span><span class=\"token punctuation\">(</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">Date</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n    <span class=\"token punctuation\">}</span>\n  <span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">}</span></code></pre></div>","description":"The scheduler plugin provides an api for other plugins to execute scheduled jobs. The plugin is based on the quartz project. Configuration The plugin needs no…","tableOfContents":"<ul>\n<li>\n<p><a href=\"#configuration\">Configuration</a></p>\n</li>\n<li>\n<p><a href=\"#api-usage\">API Usage</a></p>\n<ul>\n<li><a href=\"#notes\">Notes</a></li>\n<li><a href=\"#further-reading\">Further reading</a></li>\n<li><a href=\"#complete-example\">Complete Example</a></li>\n</ul>\n</li>\n</ul>","frontmatter":{"title":"Scheduler Plugin","subtitle":null,"displayToc":null,"description":null,"keywords":null,"image":null}}},"pageContext":{"slug":"/docs/1.x/en/scheduler-plugin/","version":"1.x","latestVersion":"3.12.x","latestPageVersion":"1.x","language":"en","relativePath":"/scheduler-plugin/","canonicalPath":"/docs/1.x/en/scheduler-plugin/","latestRootPath":"/docs/3.12.x/en/"}},
    "staticQueryHashes": ["1973669194","2742214048","2956773653","2957019495","698804963"]}