The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RE: setup cPanel crons using CURL()

Discussion in 'General Discussion' started by zaggs, Jun 6, 2006.

  1. zaggs

    zaggs Member

    Joined:
    Dec 5, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    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.. :)
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    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.
     
  3. zaggs

    zaggs Member

    Joined:
    Dec 5, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    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..
     
  4. zaggs

    zaggs Member

    Joined:
    Dec 5, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    any further ideas?
     
  5. zaggs

    zaggs Member

    Joined:
    Dec 5, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    still looking for ideas...
     
Loading...

Share This Page