cron issue... how-to someone please help

ClevelandSlim

Registered
Jul 30, 2007
4
0
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~
 

roba

Member
Jan 20, 2004
12
0
151
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.