• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

Create a cron job to execute a php script using php

dfutura

Basic Pleskian
I need to create a cron job or something similar with a php script. I try to create a file usingh php in etc/crontab like this:

$archivo = '/var/cron.d/pruebaCronMandaMail';
$fp = fopen($archivo, "a");
$string = "/usr/bin/php -q /var/www/vhosts/domain.com/httpdocs/createCronScript.php";
$write = fputs($fp, $string);
print_r($write);
fclose($fp);

But with apache user i cant create this file.

How can i do?
 
Back
Top