<commit_before>#!/bin/env node

module.exports = function()
{
	var scope = this;

	this.CronJob = require('cron').CronJob;
	this.NewReleases = require(__dirname + '/new-release-checker');
	this.User = require(__dirname + '/../db/user');
	this.runningJobs = [];
	this.runningJobsSettings = {};

	this.init = function()
	{
		var masterJob = new scope.CronJob(
		{
			cronTime: '00 * * * * *',
			onTick: scope.addNewCronJobs,
			start: true,
			timeZone: 'Europe/Amsterdam'
		});
		scope.addNewCronJobs();
	};

	this.addNewCronJobs = function()
	{
		scope.User.find({active:true}).select({crontime: 1, timezone: 1, _id:0}).lean(true).exec(function(err, cronJobs)
		{
			// ADD NEW CRONJOBS<commit_msg>Moved masterCronJob to main scope<commit_after>#!/bin/env node

module.exports = function()
{
	var scope = this;

	this.CronJob = require('cron').CronJob;
	this.NewReleases = require(__dirname + '/new-release-checker');
	this.User = require(__dirname + '/../db/user');
	this.masterCronJob = undefined;
	this.runningJobs = [];
	this.runningJobsSettings = {};

	this.init = function()
	{
		scope.masterCronJob = new scope.CronJob(
		{
			cronTime: '00 * * * * *',
			onTick: scope.addNewCronJobs,
			start: true,
			timeZone: 'Europe/Amsterdam'
		});
		scope.addNewCronJobs();
	};

	this.addNewCronJobs = function()
	{
		scope.User.find({active:true}).select({crontime: 1, timezone: 1, _id:0}).lean(true).exec(function(err, cronJobs)
		{
			// ADD NEW CRONJOBS
{'fraction_non_alphanumeric': 0.17433081674673986, 'fraction_numerical': 0.0068634179821551134, 'mean_word_length': 3.993150684931507, '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': '1338709', 'n_tokens_mistral': 601, 'n_tokens_neox': 552, 'n_words': 90}