I have this php code:
please check it and add it in cron-job of directadmin, then an email you will receive that a function is disabled in your system, I think it is pcntl so I enabled it(I asked here but no one answered me how to do it, So I don't if I did it right or not)
but after enabling pcntl it is not woring yet.
note that before above codes, add location of some of your other scripts in $jobs array like this:
please check it and tell me how can I use this codes in directadmin?
PHP:
foreach ($jobs as $job) {
$pid = pcntl_fork();
if (! $pid) {
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w")
);
$process = proc_open($job['cmd'], $descriptorspec, $pipes);
if (is_resource($process)) {
echo $procout = stream_get_contents($pipes[1]);
echo $procerror = stream_get_contents($pipes[2]);
fclose($pipes[1]);
fclose($pipes[2]);
$return_value = proc_close($process);
}
break;
}
}
please check it and add it in cron-job of directadmin, then an email you will receive that a function is disabled in your system, I think it is pcntl so I enabled it(I asked here but no one answered me how to do it, So I don't if I did it right or not)
but after enabling pcntl it is not woring yet.
note that before above codes, add location of some of your other scripts in $jobs array like this:
PHP:
<?php
$jobs = array(
'/home/your_directory/test1.php';
'/home/your_directory/test2.php'
);
please check it and tell me how can I use this codes in directadmin?