Plan Description
The desc field holds the task's description.
Using Variables
The following built-in variables are available:
- Current year:
{{year}}, current week number:{{week_of_year}}, weekday:{{weekday_zh}} - Plan start time:
{{at}} - Today's tasks:
{{todo_and_notice}}— useful in an email plan to send yourself a daily email - More variables: Built-in Variables - PlanTodo
Example:
If the output date is 2024-01-31, which is Wednesday of week 5, the actual output would be: "This year is 2024, week number is 4, today is Wednesday."
Queue Mode
Each time a plan is triggered, it outputs the first line from top to bottom, then deletes that line. When desc is a list, queue mode is the default.
Suitable for situations where content needs to be added periodically.
For example, watching English videos on YouTube daily — on the weekend, you can add next week's video URLs one by one, so each day outputs a different URL.
Round-Robin Mode
If an index field is present, round-robin mode is used.
Each time triggered, it outputs content in order — day one outputs the first item, day two the second, and so on. After reaching the last item, it starts over from the first.
index is followed by a positive integer indicating which item to output this time. 1 points to the first item.
Suitable for cycling through a series of different tasks.
Specifying Execution Time
To specify an execution time, add an at field followed by a time in hh:mm:ss format (strictly two digits), 24-hour clock, e.g., 06:30:00, 14:01:00.
Take medicine at 8:30 every day:
After at, you can also use words representing moments of the day, such as dawn, sunrise, sunset, dusk.
Addition or subtraction is also supported, but only with two operands — the left must be a word, and the right must be a duration. For example, "sleep time is 7.5 hours before dawn":
If no specific execution time is specified, the task's execution time is set to the moment the program generates the task summary. You can also manually specify: at: once.
Additionally, you can use at to specify that a plan should execute after another plan, using after_tag, where tag should be replaced with the actual name.
Execute after the plan with the given tag:
If the tag has no matching plan, the effect is the same as not using at. If the tag matches multiple plans (triggered ones), for after, it will be placed after the last one.
Currently, plans using
after_tagmust be placed at the end of the plan list to take effect. This will be improved in the future.
Task ordering follows two main rules: if at is not specified, the task follows the previous one. If at is specified, there are two cases: if at is followed by a specific time, it executes at that time regardless of its position relative to other plans; if at is followed by after_tag, it follows immediately after the corresponding task. There is also a special rule: if the first task does not specify at, since there is no preceding task, its execution time defaults to at: once.