• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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