Support apscheduler cron expressions

This commit is contained in:
JonnyWong16 2024-09-25 11:54:55 -07:00
parent 9ca8d59372
commit 3cf6560de3
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 28 additions and 13 deletions

View file

@ -50,7 +50,10 @@
</div>
<p class="help-block">
<span id="simple_cron_message">Set the schedule for the newsletter.</span>
<span id="custom_cron_message">Set the schedule for the newsletter using a <a href="${anon_url('https://crontab.guru')}" target="_blank" rel="noreferrer">custom crontab</a>. Only standard cron values are valid.</span>
<span id="custom_cron_message">
Set the schedule for the newsletter using a <a href="${anon_url('https://crontab.guru')}" target="_blank" rel="noreferrer">custom crontab</a>.
<a href="${anon_url('https://apscheduler.readthedocs.io/en/3.x/modules/triggers/cron.html#expression-types')}" target="_blank" rel="noreferrer">Click here</a> for a list of supported expressions.
</span>
</p>
</div>
<div class="form-group">
@ -481,7 +484,7 @@
});
if (${newsletter['config']['custom_cron']}) {
$('#cron_value').val('${newsletter['cron']}');
$('#cron_value').val('${newsletter['cron'] | n}');
} else {
try {
cron_widget.cron('value', '${newsletter['cron']}');