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.

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:
    1
    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:
    1
    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