• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Create Cron Task

Farid

New Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
18.0.57 Update #5
Hi,
I created a script on my commands folder and add it to kernel file.
Now I want to create a Cron Task for this script but I don't know which option should I use between 'Run a command' and 'Run PHP Script'.
And I don't know exactly how to retrieve correct information to put inside these fields...

Architecture is something like this:

Home Directory/MyDomain/Mysubdomaine/applicationapi/app/console/commands/PurgeOldLogs

I'm using Plesk Linux Obsidian.

Could anyone help me?
 
Is it a PHP script or is it a shell script? For PHP scripts, it is best to choose the "Run PHP Script" option, for others the "Run a command" option. To address the script, it normally works most reliably to put the fully qualified path into the input box, e.g. /var/www/vhosts/<your subscription>/<your domain's document root>/subdirectory/file.php.
 
Is it a PHP script or is it a shell script? For PHP scripts, it is best to choose the "Run PHP Script" option, for others the "Run a command" option. To address the script, it normally works most reliably to put the fully qualified path into the input box, e.g. /var/www/vhosts/<your subscription>/<your domain's document root>/subdirectory/file.php.
I am trying to do php script, would it be /var/www/vhosts/mydomain.com/httpdocs/directory/file.php
 
You can either specificy the full path as suggested or you can start from httpdocs (without slash in that case).
 
Back
Top