Help with Cron

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
SilverMist
Forum Commoner
Posts: 65
Joined: Tue Mar 02, 2004 2:06 pm
Location: Canada
Contact:

Help with Cron

Post by SilverMist »

Okay I'm doing this project where a user enters one of their animals in competitions, and the competitions are on Wednesdays and Saturdays. When the user places high in a competition they are awarded points and fake money. Since CPanel 9 offers such a lovely setup for cron, I don't need help with that. I just need help with the page for the command. It's got to:
A) Update the database with the new total of points for the animal
B) Update the database with the new points for the member
C) Update the database with the new total of earnings for the animal
D) Update the database with the new amount of money for the member
E) I also need help with the lovely display of say, show.php?id=021512 with the 1st, 2nd, 3rd place finishes, all the way down the line to the last place finish.

Anyone that can offer their expertise with this I would really appreciate it!
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

Create a script that looks similar to this:

Code: Select all

#!/usr/bin/bash
<?php
// code here
?>
Then chmod +x the script and let the crontab run it.
User avatar
SilverMist
Forum Commoner
Posts: 65
Joined: Tue Mar 02, 2004 2:06 pm
Location: Canada
Contact:

Post by SilverMist »

Yes well see the code is what I'm having trouble with...Hmm, maybe this should actually be in PHP Code...Gah I'm dumb.
Post Reply