Page updated:

Scheduling

TrendRadar's scheduling system (Timeline) controls when the crawling, push, and analysis tasks run each day. You can get started quickly by picking a built-in preset template, or customize the schedule entirely.

Config file locations

The scheduling system involves two configuration files:
FileRoleMust edit?
config/config.yamlSelect a preset name in the schedule section and enable schedulingRequired
config/timeline.yamlDefines time periods, day plans, and the weekday mapping (edit it when using the custom preset)Only when customizing

Quick start

The simplest approach is to set a preset name in config/config.yaml. You only need to change one field to enable the scheduling system:
schedule:
  enabled: true
  preset: "morning_evening"  # 修改这里选择预设
Just replace the value of preset with the preset name you want to use. Below are all the available preset templates.

Preset templates

TrendRadar ships with 5 preset templates that cover most use cases. Pick the preset closest to your daily routine, then set the corresponding name in config.yaml.
Preset nameBest forPush behavior
morning_eveningAll-day incremental + evening summary (recommended)Push new items throughout the day + a daily summary at 20:00-22:00
always_onRound-the-clock monitoringPush immediately whenever there is a new item
office_hoursWorking hoursThree segments on workdays (arrival brief, midday hot topics, end-of-day summary); free incremental on weekends
night_owlNight owlAfternoon preview + a full late-night summary (22:00-01:00, spanning midnight)
customFully customizableDefine it freely by editing the custom section of timeline.yaml

Custom configuration

If the built-in presets don't meet your needs, set preset to "custom", then edit the custom section at the bottom of config/timeline.yaml.

once mechanism: execute only once per period

Each time period can use the once configuration to control whether push/analysis runs only once within that period:
evening_summary:
  start: "20:00"
  end: "22:00"
  push: true
  report_mode: "daily"
  once:
    analyze: true    # Run AI analysis only once in this period
    push: true       # Push only once in this period

Switching keyword/interest files per period

Each time period can specify its own keyword file and AI interest file, allowing you to focus on different topics at different times:
periods:
  morning_brief:
    start: "08:00"
    end: "10:00"
    frequency_file: "tech.txt"        # Use the tech keyword list in the morning
    interests_file: "tech_ai.txt"     # AI focuses on tech in the morning
    report_mode: "incremental"

  evening_summary:
    start: "20:00"
    end: "22:00"
    frequency_file: "finance.txt"     # Use the finance keyword list in the evening
    interests_file: "finance.txt"     # AI focuses on finance in the evening
    report_mode: "daily"
  • Keyword files go in the config/custom/keyword/ directory
  • AI interest files go in the config/custom/ai/ directory
  • When not specified, the defaults config/frequency_words.txt and config/ai_interests.txt are used

Things to note