1# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements. See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership. The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License. You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied. See the License for the
15# specific language governing permissions and limitations
16# under the License.
17
18from __future__ import annotations
19
20from airflow.sdk.bases.timetable import BaseTimetable
21
22
23class NullTimetable(BaseTimetable):
24 """
25 Timetable that never schedules anything.
26
27 This corresponds to ``schedule=None``.
28 """
29
30 can_be_scheduled = False
31
32
33class OnceTimetable(BaseTimetable):
34 """
35 Timetable that schedules the execution once as soon as possible.
36
37 This corresponds to ``schedule="@once"``.
38 """
39
40
41class ContinuousTimetable(BaseTimetable):
42 """
43 Timetable that schedules continually, while still respecting start_date and end_date.
44
45 This corresponds to ``schedule="@continuous"``.
46 """
47
48 active_runs_limit = 1