Revision as of 21:52, 3 October 2024 by KazVee (talk | contribs) (Created page with "== Cron Jobs == In Plesk, cron jobs are called `Scheduled Tasks`. == Cron Jobs Affect Account Load == Scheduled Tasks count towards your total account load. This means that running too many cron jobs or starting a cron job to run every 1 minute risks your account getting suspended for high server usage. Refer to the Cron Jobs section of our Suspension Policy for more details. == Setting up a Scheduled Task == To access the cron job section, n...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Cron Jobs

Cron Jobs

In Plesk, cron jobs are called `Scheduled Tasks`.

Cron Jobs Affect Account Load

Scheduled Tasks count towards your total account load. This means that running too many cron jobs or starting a cron job to run every 1 minute risks your account getting suspended for high server usage. Refer to the Cron Jobs section of our Suspension Policy for more details.

Setting up a Scheduled Task

To access the cron job section, navigate to:

Login > Plesk > Websites & Domains > [ domain ] > Scheduled Tasks > `Add Task`

![](../../.gitbook/assets/plesk-scheduled-tasks.png)

Cron Jobs are chrooted

Scheduled Tasks run in a chroot environment with limited access to binaries and executables for security reasons. This means you cannot directly access certain programs or scripts outside of your home directory.

Working Around the chroot

Some options to work around the chroot environment when setting up a Scheduled Task include:

Flask Endpoint

Set up a Flask application and create an endpoint like `domain.helioho.st/update`, then use the "Fetch a URL" option inside Scheduled Tasks to access it via `https`.

If you're new to Flask or want a more detailed guide, check out this [Flask tutorial](../flask.md) to help you get started.

Python

Set up a Python script in the `cgi-bin` directory, then use the "Fetch a URL" option inside Scheduled Tasks to access the file via `https`.

If you're new to Python or want a more detailed guide, check out this Python_Tutorial to help you get started.

![](../../.gitbook/assets/plesk-schedule-a-task.png)


This page was last edited on 3 October 2024, at 21:52.