• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

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