Author Topic: Daily Stats Cronjob  (Read 2651 times)

Offline kingcat

  • Junior Indexer
  • **
  • Posts: 20
  • Helpful: +5/-0
  • NZB.Cat
    • NZB.Cat
Daily Stats Cronjob
« on: 2015-02-10, 04:45:38 PM »
I wrote this script to send me an email every time it's run showing me the recent activity on the site. So far it tracks:
  • New users created within the last 24 hours and 7 days
  • Total daily logins (how many logins in 24 hours)
  • Total daily user logins (how many users logged in in 24 hours)
  • Pending invites
  • Total user count for specified roles (as well as overall total)

It's intended to be run daily via cron from the misc/update folder.

Read the comments in the file for further information.

If anyone can improve on this code or has suggestions, feel free :)
99% Completion, 2000 Days Retention
https://nzb.cat

Offline david_ritterhous

  • Prolific Indexer
  • ****
  • Posts: 240
  • Helpful: +6/-0
Re: Daily Stats Cronjob
« Reply #1 on: 2015-02-11, 08:23:45 AM »
nice work and thanks for sharing