cPanel API 2 Functions - Cron::add_line
Hi,
I have created a PHP script (based in cPanel API 2 Functions - Cron::add_line - Developer Documentation - cPanel Documentation
I am using this code:
but it doesnt work. (It doesnt show any error either.) What should I do? Thanks, Francisco
require_once "/usr/local/cpanel/php/cpanel.php";
$cpanel = new CPANEL('cpanel_username', 'cpanel_password', 'cpanel.mydomain.com');
// Add a crontab entry.
$dick_clark = $cpanel->api2(
'Cron', 'add_line',
array(
'command' => '/usr/bin/perl/home/username/happynewyear.pl',
'day' => '1',
'hour' => '0',
'minute' => '0',
'month' => '1',
'weekday' => '*',
)
);but it doesnt work. (It doesnt show any error either.) What should I do? Thanks, Francisco
-
When you run it manually what is the output? 0 -
I run it in a PHP script. It doesn"t show me any error, but it doesn"t create the cronjob either. Do you have or anyone has a PHP working example that I can upload? Thanks, Francisco 0
Please sign in to leave a comment.
Comments
2 comments