• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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