Ripple's cron script

Morgan Bazalgette 1fcea463be
Forgot to remove the actual files :thinking:
1 month ago
.gitignore Initial commit 1 year ago
LICENSE Update LICENSE and README 11 months ago Use instead of 3 months ago
cache_data.go Use instead of 3 months ago
calculate_accuracy.go (╯°□°)╯︵ ┻━┻ gofmt 1 month ago
calculate_overall_accuracy.go PP on mania hype? 1 year ago
calculate_pp.go Change CalculateLeaderboard into PopulateRedis 3 months ago
cron.go Rewrite CleanReplays 1 month ago
fix_multiple_completed_scores.go Make cron shut up a bit 7 months ago
fix_score_duplicates.go Make cron shut up a bit 7 months ago
hanayo.go set online users 7 months ago
haspp.go PP on mania hype? 1 year ago
redis.go Save number of users in country in hanayo:country_list 3 months ago
replays.go Forgot to remove the actual files :thinking: 1 month ago


The fastest cron for ripple you'll never need.

A bit of explaination here:

Ripple uses a cronjob to fix any eventual errors in the database. For doing it, it used cron.php, a terribly performing script. No, really. That's three minutes of server CPU being used at 100%!

So I decided to rewrite it to be better performant, and what better language to do it if not Go (well, C, C++ and Assembly are indeed faster, but I'm not on that level of insanity).

This is the result:#42583 (watch the video especially for the last 30 seconds, as you can see the true power of ripple-cron-go).

  • Origin:
  • Mirror:


Assuming you have Go installed and your GOPATH set up

go get -u
cd $GOPATH/src/
go build
nano cron.conf
./ripple-cron-go # Boom!


This is an example of a very simple unit of ripple-cron-go:

package main

import (


func opTimeConsumingTask() {
	defer wg.Done()

	color.Green("> TimeConsumingTask: done!", count)

Then you would add a bool in the config struct to enable/disable the task, then this to cron.go (cron.go contains main())

	if c.TimeConsumingTask {
		verboseln("Starting time consuming task...")
		go opTimeConsumingTask()


All code in this repository is licensed under the GNU AGPL 3 License.
See the "LICENSE" file for more information.