Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    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.. :)
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    166
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. zaggs

    zaggs Member

    Joined:
    Dec 5, 2004
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    151
    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:
    151
    any further ideas?
     
  5. zaggs

    zaggs Member

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

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice