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!

cron issue... how-to someone please help

Discussion in 'General Discussion' started by ClevelandSlim, Aug 8, 2007.

  1. ClevelandSlim

    ClevelandSlim Registered

    Joined:
    Jul 30, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    I am running a cgi script in my cgi-bin on my server. there is a link in the admin section of the script, that updates the pages that the script generates for surfers. i need to know how to setup a cron item that will basically make it so i don't have to login to the script with the admin user and pass and click the refresh link myself. I need to automate this chore so the cron does it everyday at 1 am server time.

    what is the proper command to use in the basic cron view.

    someone please help.

    ~Slim~
     
  2. roba

    roba Member

    Joined:
    Jan 20, 2004
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Prague, CZ
    cPanel Access Level:
    Root Administrator
    Can your script be accessed without entering username and password first? If not, then you have a problem, becouse Cron itself can't do it.

    However if your script authentize users via HTTP auth, then you can try to call the script via URL with wget, for example:

    wget --http-user=username --http-pass=password http://www.server.com/admin/script.cgi?params

    (params can be supplied also by --post-data=xxxx if the script does not accept GET method data)

    If the script uses different form of auth (cookies/session/session IDs), then you can try to extract your cookie information from your browser and use it with WGET (--load-cookies) however this will only work if that script does not verify IP/useragent for each session. Useragent can be simulated too (--user-agent) but IP can not.
     
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