<commit_before>package main

import (
	"log"

	"github.com/robfig/cron"
)

var (
	metricsToSave = []Metric{&Cloudwatch{"NetworkOut"}}
)

func main() {
	c := cron.New()

	// queue to get metrics at top of every hour; uses redis set to queue
	// the usernames so multiple workers don't queue the same usernames.
	c.AddFunc("@hourly", func() {
		err := queueUsernamesForMetricGet()
		if err != nil {
			log.Fatal(err)
		}
	})

	// get and save metrics at 5th and 35th minutes of every hour; the
	// reason for 5th minute, is to not queue and pop at the same time.
	c.AddFunc("0 5-59/30 * * * *", func() {
		err := getAndSaveQueueMachineMetrics()
		if err != nil {
			log.Fatal(err)
		}
	})

	// stop machines overlimit at 10th and 40th minutes of every hour;
	// there's no reason for running it at a certain point of the hour,
	// there's no overlap for the logs to not overlap.
	c.AddFunc("0 10-59/35 * * * *", func() {
		err := stopMachinesOverLimit()
		if err != nil {
			log.Fatal(err)
		}
	})

	c.Start()

	// run forever
	select {}
}<commit_msg>vmwatcher: fix cron schedules<commit_after>package main

import (
	"log"

	"github.com/robfig/cron"
)

var (
	metricsToSave = []Metric{&Cloudwatch{"NetworkOut"}}
)

func main() {
	c := cron.New()

	// queue to get metrics at top of every hour; uses redis set to queue
	// the usernames so multiple workers don't queue the same usernames.
	c.AddFunc("@hourly", func() {
		err := queueUsernamesForMetricGet()
		if err != nil {
			log.Fatal(err)
		}
	})

	// get and save metrics at 5th and 35th minutes of every hour; the
	// reason for 5th minute, is to not queue and pop at the same time.
	c.AddFunc("0 15 * * * *", func() {
		err := getAndSaveQueueMachineMetrics()
		if err != nil {
			log.Fatal(err)
		}
	})

	// stop machines overlimit at 10th and 40th minutes of every hour;
	// there's no reason for running it at a certain point of the hour,
	// there's no overlap for the logs to not overlap.
	c.AddFunc("0 0,30 * * * *", func() {
		err := stopMachinesOverLimit()
		if err != nil {
			log.Fatal(err)
		}
	})

	c.Start()

	// run forever
	select {}
}
{'fraction_non_alphanumeric': 0.1330166270783848, 'fraction_numerical': 0.0171021377672209, 'mean_word_length': 3.0813953488372094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3601367', 'n_tokens_mistral': 816, 'n_tokens_neox': 733, 'n_words': 255}