Plesk control panel provides an easy-to-use interface for setting up tasks that run periodically, such as every X minutes. These tasks are known as "scheduled tasks" or "cron jobs". To set up a task to be executed every X minutes in Plesk, follow these steps:
-
Log in to your Plesk control panel.
-
In the left sidebar, click on "Websites & Domains."
-
Find the domain you want to set up the scheduled task for and click on it.
-
Scroll down to the "Advanced" section and click on "Scheduled Tasks."
-
In the "Scheduled Tasks" window, click on "Add Task."
-
Choose the task type from the dropdown menu. You can select "Run a command" to execute a shell command or "Fetch a URL" to request a specific URL.
- For "Run a command," enter the command you want to execute in the "Command" field.
- For "Fetch a URL," enter the URL you want to request in the "URL" field.
-
In the "Run" section, choose the "Cron style" option.
-
In the "Cron style" field, set the desired schedule using the cron syntax. To run the task every X minutes, use the following format:
*/X * * * *
Replace 'X' with the number of minutes you want the task to run. For example, to run the task every 10 minutes, enter*/10 * * * *
. -
Optionally, you can configure email notifications by choosing "Send email notifications" and entering the email address to which you want to send the notifications.
-
Click on "OK" to save the task.
That's it! You have successfully set up a scheduled task to run every X minutes using the Plesk control panel. The task will now execute according to the schedule you defined.