def schedule(cron_schedule, pipeline_name, name=None, tags=None, tags_fn=None, solid_selection=None, mode='default', should_execute=None, environment_vars=None, execution_timezone=None):
    "Create a schedule.\n\n    The decorated function will be called as the ``run_config_fn`` of the underlying\n    :py:class:`~dagster.ScheduleDefinition` and should take a\n    :py:class:`~dagster.ScheduleExecutionContext` as its only argument, returning the environment\n    dict for the scheduled execution.\n\n    Args:\n        cron_schedule (str): A valid cron string specifying when the schedule will run, e.g.,\n            ``'45 23 * * 6'`` for a schedule that runs at 11:45 PM every Saturday.\n        pipeline_name (str): The name of the pipeline to execute when the schedule runs.\n        name (Optional[str]): The name of the schedule to create.\n        tags (Optional[Dict[str, str]]): A dictionary of tags (string key-value pairs) to attach\n            to the scheduled runs.\n        tags_fn (Optional[Callable[[ScheduleExecutionContext], Optional[Dict[str, str]]]]): A function\n            that generates tags to attach to the schedules runs. Takes a\n            :py:class:`~dagster.ScheduleExecutionContext` and returns a dictionary of tags (string\n            key-value pairs). You may set only one of ``tags`` and ``tags_fn``.\n        solid_selection (Optional[List[str]]): A list of solid subselection (including single\n            solid names) to execute when the schedule runs. e.g. ``['*some_solid+', 'other_solid']``\n        mode (Optional[str]): The pipeline mode in which to execute this schedule.\n            (Default: 'default')\n        should_execute (Optional[Callable[[ScheduleExecutionContext], bool]]): A function that runs at\n            schedule execution tie to determine whether a schedule should execute or skip. Takes a\n            :py:class:`~dagster.ScheduleExecutionContext` and returns a boolean (``True`` if the\n            schedule should execute). Defaults to a function that always returns ``True``.\n        environment_vars (Optional[Dict[str, str]]): Any environment variables to set when executing\n            the schedule.\n        execution_timezone (Optional[str]): Timezone in which the schedule should run. Only works\n            with DagsterDaemonScheduler, and must be set when using that scheduler.\n    "

    def inner(fn):
        check.callable_param(fn, 'fn')
        schedule_name = (name or fn.__name__)
        return ScheduleDefinition(name=schedule_name, cron_schedule=cron_schedule, pipeline_name=pipeline_name, run_config_fn=fn, tags=tags, tags_fn=tags_fn, solid_selection=solid_selection, mode=mode, should_execute=should_execute, environment_vars=environment_vars, execution_timezone=execution_timezone)
    return inner
Create a schedule.

The decorated function will be called as the ``run_config_fn`` of the underlying
:py:class:`~dagster.ScheduleDefinition` and should take a
:py:class:`~dagster.ScheduleExecutionContext` as its only argument, returning the environment
dict for the scheduled execution.

Args:
    cron_schedule (str): A valid cron string specifying when the schedule will run, e.g.,
        ``'45 23 * * 6'`` for a schedule that runs at 11:45 PM every Saturday.
    pipeline_name (str): The name of the pipeline to execute when the schedule runs.
    name (Optional[str]): The name of the schedule to create.
    tags (Optional[Dict[str, str]]): A dictionary of tags (string key-value pairs) to attach
        to the scheduled runs.
    tags_fn (Optional[Callable[[ScheduleExecutionContext], Optional[Dict[str, str]]]]): A function
        that generates tags to attach to the schedules runs. Takes a
        :py:class:`~dagster.ScheduleExecutionContext` and returns a dictionary of tags (string
        key-value pairs). You may set only one of ``tags`` and ``tags_fn``.
    solid_selection (Optional[List[str]]): A list of solid subselection (including single
        solid names) to execute when the schedule runs. e.g. ``['*some_solid+', 'other_solid']``
    mode (Optional[str]): The pipeline mode in which to execute this schedule.
        (Default: 'default')
    should_execute (Optional[Callable[[ScheduleExecutionContext], bool]]): A function that runs at
        schedule execution tie to determine whether a schedule should execute or skip. Takes a
        :py:class:`~dagster.ScheduleExecutionContext` and returns a boolean (``True`` if the
        schedule should execute). Defaults to a function that always returns ``True``.
    environment_vars (Optional[Dict[str, str]]): Any environment variables to set when executing
        the schedule.
    execution_timezone (Optional[str]): Timezone in which the schedule should run. Only works
        with DagsterDaemonScheduler, and must be set when using that scheduler.
def schedule(cron_schedule, pipeline_name, name=None, tags=None, tags_fn=None, solid_selection=None, mode='default', should_execute=None, environment_vars=None, execution_timezone=None):
    "Create a schedule.\n\n    The decorated function will be called as the ``run_config_fn`` of the underlying\n    :py:class:`~dagster.ScheduleDefinition` and should take a\n    :py:class:`~dagster.ScheduleExecutionContext` as its only argument, returning the environment\n    dict for the scheduled execution.\n\n    Args:\n        cron_schedule (str): A valid cron string specifying when the schedule will run, e.g.,\n            ``'45 23 * * 6'`` for a schedule that runs at 11:45 PM every Saturday.\n        pipeline_name (str): The name of the pipeline to execute when the schedule runs.\n        name (Optional[str]): The name of the schedule to create.\n        tags (Optional[Dict[str, str]]): A dictionary of tags (string key-value pairs) to attach\n            to the scheduled runs.\n        tags_fn (Optional[Callable[[ScheduleExecutionContext], Optional[Dict[str, str]]]]): A function\n            that generates tags to attach to the schedules runs. Takes a\n            :py:class:`~dagster.ScheduleExecutionContext` and returns a dictionary of tags (string\n            key-value pairs). You may set only one of ``tags`` and ``tags_fn``.\n        solid_selection (Optional[List[str]]): A list of solid subselection (including single\n            solid names) to execute when the schedule runs. e.g. ``['*some_solid+', 'other_solid']``\n        mode (Optional[str]): The pipeline mode in which to execute this schedule.\n            (Default: 'default')\n        should_execute (Optional[Callable[[ScheduleExecutionContext], bool]]): A function that runs at\n            schedule execution tie to determine whether a schedule should execute or skip. Takes a\n            :py:class:`~dagster.ScheduleExecutionContext` and returns a boolean (``True`` if the\n            schedule should execute). Defaults to a function that always returns ``True``.\n        environment_vars (Optional[Dict[str, str]]): Any environment variables to set when executing\n            the schedule.\n        execution_timezone (Optional[str]): Timezone in which the schedule should run. Only works\n            with DagsterDaemonScheduler, and must be set when using that scheduler.\n    "

    def inner(fn):
        check.callable_param(fn, 'fn')
        schedule_name = (name or fn.__name__)
        return ScheduleDefinition(name=schedule_name, cron_schedule=cron_schedule, pipeline_name=pipeline_name, run_config_fn=fn, tags=tags, tags_fn=tags_fn, solid_selection=solid_selection, mode=mode, should_execute=should_execute, environment_vars=environment_vars, execution_timezone=execution_timezone)
    return inner