Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cron documentation to include Spring formatting #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/using/importers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ <h3 id="creating-a-new-scheduled-import">Creating a new scheduled import</h3>
<p><img src="/images/importer-step3.png" alt="importer-step3"></p>
<p>On first time creation the Job is automatically <code>Scanned</code> and <code>Imported</code>.</p>
<h3 id="configure-scheduling-interval">Configure scheduling interval</h3>
<p>The scheduling interval can be globally configured for all the Jobs. It is a global setting and not a per-Job one. This is achieved through the <code>services.update.interval</code> property in the <code>application.properties</code> configuration file that takes the value of <code>SERVICES_UPDATE_INTERVAL</code> environment variable. The value should be set to a valid <a href="https://en.wikipedia.org/wiki/Cron#CRON_expression">CRON expression</a> ; default is every 2 hours.</p>
<p>The scheduling interval can be globally configured for all the Jobs. It is a global setting and not a per-Job one. This is achieved through the <code>services.update.interval</code> property in the <code>application.properties</code> configuration file that takes the value of <code>SERVICES_UPDATE_INTERVAL</code> environment variable. The value should be set to a valid <a href="https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm">CRON expression in Spring format</a> ; default is every 2 hours.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big fan of having a link to Oracle documentation... you were mentioning Spring documentation in your comment. I've found this link to be helpful: https://spring.io/blog/2020/11/10/new-in-spring-5-3-improved-cron-expressions
What do you think?

<pre><code class="language-properties" data-lang="properties">services.update.interval=${SERVICES_UPDATE_INTERVAL:0 0 0/2 * * *}
</code></pre><h2 id="error-management">Error management</h2>
<p>As an import can be scheduled and can take a <em>little</em> time, it is done asynchronously regarding the human interaction that has triggered it. We choose not to have a blocking process for error management: Microcks importers will try to discover and import services but will die silently in case of any failure. We also think that this also promotes iterative and incremental way of working: you know that your job will gracefully fail if your new samples are not yet complete.</p>
Expand Down