RE: setup cPanel crons using CURL()

zaggs

Member
Dec 5, 2004
21
0
151
Hi Guys,
I have created a script that automatically creates cron jobs via cPanel. It creates the first cron job fine, but then the second cron job will not be added.

I am using PHP's CURL() function to create the crons. My script posts the following values to the "/cron/editcron.html" page:


0-minute
0-hour
0-day
0-month
0-weekday
0-command
entcount

However, it only adds the first cron. How can I add additional crons? Do I have to post other values to the page? I have tried changing the value of "entcount" but it does not seem to have any effect.

Thanks in advance.. :)
 

zaggs

Member
Dec 5, 2004
21
0
151
webignition said:
You could extend your remote access functionality to perform this task.

You'd just need to be able to script something server-side to correctly modify the contents of /var/spool/cron/relevantuser.
Thanks for your reply, however, I really need to be able to create crons using CURL().

Not sure why my script is only adding the first cron. Maybe I forgot to post some other variable to the script??

Any ideas..