diff --git a/sites/platform/src/create-apps/workers.md b/sites/platform/src/create-apps/workers.md index af08b1a342..ee62b176fb 100644 --- a/sites/platform/src/create-apps/workers.md +++ b/sites/platform/src/create-apps/workers.md @@ -32,11 +32,32 @@ allowing the container to be shut down and restarted. To restart a worker manually, [access the container](#access-the-worker-container) and run the following commands: +{{< codetabs >}} + ++++ +title=Using ``systemctl`` ++++ + +```bash +systemctl restart --user app +``` + +<---> ++++ +title=Using `sv` ++++ + ```bash sv stop app sv start app ``` +{{< note >}} +Use `systemctl` whenever possible. If you’re in the `vs` section, it’s worth upgrading to a [recent runtime version](/create-apps/app-reference/single-runtime-image.html#types) for better support. +{{< /note >}} + +{{< /codetabs >}} + ## Workers vs cron jobs Worker instances don't run cron jobs. diff --git a/sites/upsun/src/create-apps/workers.md b/sites/upsun/src/create-apps/workers.md index bcbe434319..23d51f6b23 100644 --- a/sites/upsun/src/create-apps/workers.md +++ b/sites/upsun/src/create-apps/workers.md @@ -29,11 +29,33 @@ allowing the container to be shut down and restarted. To restart a worker manually, [access the container](#access-the-worker-container) and run the following commands: + +{{< codetabs >}} + ++++ +title=Using ``systemctl`` ++++ + +```bash +systemctl restart --user app +``` + +<---> ++++ +title=Using `sv` ++++ + ```bash sv stop app sv start app ``` +{{< note >}} +Use `systemctl` whenever possible. If you’re in the `vs` section, it’s worth upgrading to a [recent runtime version](/create-apps/app-reference/single-runtime-image.html#types) for better support. +{{< /note >}} + +{{< /codetabs >}} + ## Workers vs cron jobs Worker instances don't run cron jobs.