<commit_before>module.exports.cron = {
    autoCheckout: {
        schedule: '* */1 * * * *',
        onTick: function(){
            Person.find({"checkedInToFacility":{"!":null}}).exec(function findCB(err, found){
                for (var i=0; i<found.length; i++){
                    var diff = Math.abs(new Date() - new Date(found[i].updatedAt));
                    var hrs = (diff/60000)/60;
                    if (hrs > 8){
                        found[i].checkedInToFacility = null;
                        found[i].reservation = null;
                        found[i].save(function(err,s){
                            console.log("Auto checkedout "+s.name);
                        });
                    }
                }
            });
            
            Person.find({"reservation":{"!":null}}).exec(function findCB(err, found){
                for (var i=0; i<found.length; i++){
                    var diff = Math.abs(new Date() - new Date(found[i].updatedAt));
                    var hrs = (diff/60000)/60;
                    if (hrs > 8){
                        found[i].checkedInToFacility = null;
                        found[i].reservation = null;
                        found[i].save(function(err,s){
                            console.log("Auto checkedout "+s.name);
                        });
                    }
                }
            });
        }
    }
}<commit_msg>Added method signature in cron for playCheck<commit_after>module.exports.cron = {
    autoCheckout: { //Runs Hourly.
        schedule: '* */1 * * * *',
        onTick: function(){
        	//Reset checkedInToFacility
            Person.find({"checkedInToFacility":{"!":null}}).exec(function findCB(err, found){
                for (var i=0; i<found.length; i++){
                    var diff = Math.abs(new Date() - new Date(found[i].updatedAt));
                    var hrs = (diff/60000)/60;
                    if (hrs > 8){
                        found[i].checkedInToFacility = null;
                        found[i].reservation = null;
                        found[i].save(function(err,s){
                            console.log("Auto checkedout "+s.name);
                        });
                    }
                }
            });
            //Reset reservation
            Person.find({"reservation":{"!":null}}).exec(function findCB(err, found){
                for (var i=0; i<found.length; i++){
                    var diff = Math.abs(new Date() - new Date(found[i].updatedAt));
                    var hrs = (diff/60000)/60;
                    if (hrs > 8){
                        found[i].checkedInToFacility = null;
                        found[i].reservation = null;
                        found[i].save(function(err,s){
                            console.log("Auto checkedout "+s.name);
                        });
                    }
                }
            });
        }
    },
    
    /*
     * Runy every minute
     * Checks for players that are playing, resets their status depending on the court time limit.
     */
    playCheck: {
        schedule: '*/1 * * * * *',
        onTick: function(){
            
        }
    }
}
{'fraction_non_alphanumeric': 0.1367334167709637, 'fraction_numerical': 0.012202753441802253, 'mean_word_length': 1.120026525198939, 'pattern_counts': {'":': 8, '<': 7, '<?xml version=': 0, '>': 7, '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': '3984683', 'n_tokens_mistral': 893, 'n_tokens_neox': 818, 'n_words': 159}