Create a Crontab from a cron expression string. For example ``crontab.from_string('* * * * *')``. .. code-block:: text ┌───────────── minute (0–59) │ ┌───────────── hour (0–23) │ │ ┌───────────── day of the month (1–31) │ │ │ ┌──────
(cls, crontab: str)
| 456 | |
| 457 | @classmethod |
| 458 | def from_string(cls, crontab: str) -> crontab: |
| 459 | """ |
| 460 | Create a Crontab from a cron expression string. For example ``crontab.from_string('* * * * *')``. |
| 461 | |
| 462 | .. code-block:: text |
| 463 | |
| 464 | ┌───────────── minute (0–59) |
| 465 | │ ┌───────────── hour (0–23) |
| 466 | │ │ ┌───────────── day of the month (1–31) |
| 467 | │ │ │ ┌───────────── month (1–12) |
| 468 | │ │ │ │ ┌───────────── day of the week (0–6) (Sunday to Saturday) |
| 469 | * * * * * |
| 470 | """ |
| 471 | minute, hour, day_of_month, month_of_year, day_of_week = crontab.split(" ") |
| 472 | return cls(minute, hour, day_of_week, day_of_month, month_of_year) |
| 473 | |
| 474 | @staticmethod |
| 475 | def _expand_cronspec( |
no outgoing calls