Source

fabric_factory / schedule.py

Full commit
"""
Schedule a ``Build`` for all recipes.
"""
from factory.models import FabfileRecipe, Build
from datetime import datetime

DEFAULT_TASK = 'build_and_test'

for recipe in FabfileRecipe.objects.all():
    if not recipe.schedule:
        continue
    name = "%s %s" % (recipe.name, datetime.now().strftime("%d/%m/%Y"))
    b = Build.objects.create(name=name,
                             task=DEFAULT_TASK,
                             fabfile_recipe=recipe)