<commit_before>import calendar
import time
import importlib
from optparse import OptionParser

import settings as settingsLib

import boto.swf
import boto.s3
from boto.s3.connection import S3Connection

import provider.swfmeta as swfmetalib
import starter

"""
SWF cron
"""

def run_cron(ENV="dev"):
    # Specify run environment settings
    settings = settingsLib.get_settings(ENV)

    current_time = time.gmtime()

    # Based on the minutes of the current time, run certain starters
    if current_time.tm_min >= 0 and current_time.tm_min <= 59:
        # Jobs to start at any time during the hour

        workflow_conditional_start(
            ENV=ENV,
            starter_name="cron_FiveMinute",<commit_msg>Instrumenting cron.py<commit_after>import calendar
import time
import importlib
from optparse import OptionParser

import settings as settingsLib

import boto.swf
import boto.s3
from boto.s3.connection import S3Connection

import provider.swfmeta as swfmetalib
import starter

import newrelic.agent

"""
SWF cron
"""

@newrelic.agent.background_task()
def run_cron(ENV="dev"):
    # Specify run environment settings
    settings = settingsLib.get_settings(ENV)

    current_time = time.gmtime()

    # Based on the minutes of the current time, run certain starters
    if current_time.tm_min >= 0 and current_time.tm_min <= 59:
        # Jobs to start at any time during the hour

        workflow_conditional_start(
            ENV=ENV,
            starter_name="cron_FiveMinute",
{'fraction_non_alphanumeric': 0.06613226452905811, 'fraction_numerical': 0.008016032064128256, 'mean_word_length': 3.710691823899371, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7398471', 'n_tokens_mistral': 471, 'n_tokens_neox': 439, 'n_words': 141}