I don't see a good reason why it should not run in cron. Did you check if you maybe got a SQL-error mail?
A few remarks though:
- The table useraward, does it contain all users? If not the new winner might fail if it is the first time someone wins.
- No need to use quotes around numeric values in queries, only cast the value to an INT if it is a dirty value (user inputed).
- Not sure if that truncate statement will work correct when a table prefix is used, because of the back-tics.
- Does the run get logged in the cron-log?
|