• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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