There is a program on just about all Unix flavors called crontab. What is does it runs a program at preset intervals - once per day, once per hour, once per minute, once per week, etc. The way I use crontab to run scripts is by editing my crontab (its actually a good practice to put crontabs under the root user, but if you don't have access, that's okay):
From the Unix command line:
crontab -e
This command will bring up the users crontab in an editor. Then you can do something like this:
0 2 /usr/scripts/backupcode.sh
0 4 * 0 /usr/local/bin/php /usr/scripts/compresslogs.php
The 5 "digits" or "*" before the command, left to right, represent:
MINUTE(0-59)
HOUR(0-23)
DAYOFMONTH(1-31)
MONTHOFYEAR(1-12)
DAYOFWEEK(0-6) Note 0 = Sun
If there is a "*" it will run on all of those days. So, in the above 2 examples, the top command will run at 2am every day, and the bottom will run at 4am every Sunday.
-Tim