Strolenati Discussions > Site Help

Nightly Cronjob

(1/2) > >>

Strolen:
Since I am having to hyper analyze it for what is going on I figured I might as well tell you what it does. Italics is more for me so I can fix it.

1.  Collects all the authors that have visited the site in the last 24 hours.
-- I do this so I don't have to go through all 2000 members that haven't visited
-- I just have to do a quick switch to a double check on all if needed

2. For each author it does a raw count of the subs and re-updates the total
-- Looks like I commented out the contributors count to this so co-authors is currently not counted in author count

3. Gives bonus XP for each logged in author during the past day

4. Gives bonus XP for how many votes are cast between checks
-- Those that use at least 5 votes get a bonus
-- Those that use all their votes get an extra bonus on top of that

5. If anybody went into negative XP, update them to 0
-- for possible newbies that don't do so well

6. Level-up Check (this is where it has been crashing for some reason)
-- Grab all the level information
-- Compare each level to the authors XP and Submission count.
-- Log level and continue checking till it hits a level it doesn't count
-- -- Could probably save a couple loops by starting with author's current level
-- Compare this level with author's level to see if they leveled up

7. Update Announcements for frontpage
-- Prune old announcements
-- Update authors that leveled-up
-- Get a new random sub of the day
-- -- Must be over a year old

8. Update Award Badges from the forum
-- Does all the sub counts and sees if they match a badge and updates as required


Special Case only run when I want
1. Updates contributors table
-- Goes through all the subs, grabs contributors and updates contrib table

2. Clean user database
-- Checks for forum posts and Citadel Submissions
-- If none after a year, delete account

3. Update Authors Comment Count

Strolen:
Updated it so that those that use at least 5 votes during the day get a bonus.

Strolen:
Updated to count all collaborative submissions as well. So submission count should be a true number now to include everything.

Silveressa:

--- Quote from: Strolen on May 13, 2012, 06:50:28 AM ---Updated to count all collaborative submissions as well. So submission count should be a true number now to include everything.

--- End quote ---

Thank you so very much for this, it;s nice to see those who work together on a sub get equal credit for their efforts  :up:

MysticMoon:
Somehow it bumped me up to level 8. It says I have 35 submissions at the top of my profile, but lower down it only shows 18 (which is correct.) I have 4 co-authored so that should only bump me up to 22 / level 7.

I only have 1 public in work, 1 advice requested, and no private in work.

Navigation

[0] Message Index

[#] Next page

Go to full version