diff --git a/docs/deployment.md b/docs/deployment.md index a71cc82..34122a9 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -1450,16 +1450,22 @@ sudo systemctl enable --now coulobre-website-job-worker.service sudo systemctl restart coulobre-panel coulobre-worker coulobre-beat ``` -Set **Website job limit** to the number of saved jobs allowed per hosting -account. Paused jobs count toward the saved limit. The default is zero. +Set **Scheduled tasks per hosting account** to the number of saved tasks +allowed per account. Paused tasks count toward the limit. The default is zero. If you lower a limit, the oldest enabled jobs retain their places until the account removes or pauses jobs. Add `website-jobs` to the local service health list if you monitor this worker from the panel. -Customers can open **Scheduled jobs** from the -account page. Operators need both **Can view hosting account** and **Can -manage scheduled website jobs**. Pick the primary or an active independent -website. Use five cron fields in UTC. For example, `*/15 * * * *` runs every +Customers can open **Advanced Features → Scheduled Tasks** and select a +hosting account. **Add task** is available when the account has an active +website and room in its hosting package. The page explains what to check +when adding tasks is unavailable. Operators and managers can open **System → +Scheduled Task Overview** to inspect tasks in their workspace. Operators +can manage tasks for accounts without an assigned customer when they have +both **Can view hosting account** and **Can manage scheduled website jobs**. + +When adding a task, pick the primary or an active independent website. +Use five cron fields in UTC. For example, `*/15 * * * *` runs every 15 minutes. Runs must be at least five minutes apart. When both day fields are restricted, the date must match both. diff --git a/src/coulobre/hosting/templates/hosting/account_detail.html b/src/coulobre/hosting/templates/hosting/account_detail.html index aa62815..31eadae 100644 --- a/src/coulobre/hosting/templates/hosting/account_detail.html +++ b/src/coulobre/hosting/templates/hosting/account_detail.html @@ -96,7 +96,7 @@ Website files {% endif %} {% if manage_website_jobs %} - Scheduled jobs + Scheduled Tasks {% endif %} {% if manage_sftp %} SFTP access diff --git a/src/coulobre/hosting/templates/hosting/system_workspace.html b/src/coulobre/hosting/templates/hosting/system_workspace.html index 27e2ffd..a35f75d 100644 --- a/src/coulobre/hosting/templates/hosting/system_workspace.html +++ b/src/coulobre/hosting/templates/hosting/system_workspace.html @@ -13,10 +13,18 @@ {% empty %}
| Domain | Task | Status | Next run (UTC) |
|---|---|---|---|
| {{ job.domain }} | {% if target %}{{ job.name }}{% else %}{{ job.name }}{% endif %} | {{ job.enabled|yesno:"Enabled,Paused" }} | {{ job.next_run_at|date:"j M Y H:i"|default:"—" }} |
| {{ job.domain }} | {% if job.account_id in manageable_accounts %}{{ job.name }}{% else %}{{ job.name }}{% endif %} | {{ job.enabled|yesno:"Enabled,Paused" }} | {{ job.next_run_at|date:"j M Y H:i"|default:"—" }} |
| No scheduled tasks for these accounts. | |||
+ {% if creation_blocker == 'service' %} + Scheduled tasks are disabled on this server. + {% if request.user.is_superuser %}Open Operator Settings{% else %}Ask your hosting provider to enable them.{% endif %} + {% elif creation_blocker == 'suspended' %} + Hosting services are suspended. Resume them before adding a task. + {% elif creation_blocker == 'no-package' %} + This account has no hosting package. + {% if is_customer %}Ask your hosting provider to assign a package that allows scheduled tasks.{% else %}Assign a package that allows scheduled tasks.{% endif %} + {% elif creation_blocker == 'disabled-by-package' %} + This hosting package has a scheduled task limit of zero. + {% if is_customer %}Ask your hosting provider to increase the limit.{% else %}Increase the limit or assign a package that allows tasks.{% endif %} + {% elif creation_blocker == 'no-website' %} + An active website is required. Review your websites. + {% elif creation_blocker == 'limit' %} + This account has reached its scheduled task limit. Remove a saved task or {% if is_customer %}ask your hosting provider to increase the limit{% else %}increase the hosting package limit{% endif %}. + {% endif %} +
+ {% endif %} +| Job | Website | Schedule (UTC) | Next run | Last result |
|---|---|---|---|---|
| Task | Website | Schedule (UTC) | Next run | Last result |
| {{ job.name }} | +{% if service_available %}{{ job.name }}{% else %}{{ job.name }}{% endif %} | {{ job.domain }} | {{ job.expression }} |
@@ -42,8 +65,10 @@ |
No tasks have been scheduled for this account.
{% else %} -No website jobs scheduled.
+No hosting accounts are available. Contact your hosting provider to get started.
{% endif %}