• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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