Gen2MinerSchedule
Batch mining orchestrator skill for recurring topic instructions.
What it does
- •Reads a JSON instruction file.
- •Selects tasks due for a run date based on cadence (
dailyormonthly). - •Executes:
- •
Gen2WebSearchfor query-based headline/topic mining. - •
Gen2WebTextfor URL-based content mining (for example BBC pages).
- •
- •Returns a structured JSON run summary.
Execution
python gen2_miner_schedule.py --config <path_to_json> --cadence <daily|monthly|all> --date <YYYY-MM-DD> [--dry-run] [--all-configs] [--inter-config-delay <seconds>]
Arguments
- •--config optional path to instruction JSON (default:
gen2_miner_schedule_config.jsonin this folder) - •--cadence optional:
daily(default),monthly, orall - •--date optional run date (default today)
- •--dry-run optional; plans tasks without executing them
- •--max-tasks optional hard cap to limit executed tasks per run
- •--all-configs optional; run all
gen2_miner_schedule*_config.jsonfiles in the config directory - •--inter-config-delay optional seconds between each config run (used with
--all-configs)
Instruction JSON format
json
{
"default_domain": "GeneralNews",
"tasks": [
{
"name": "UK Headlines",
"enabled": true,
"cadence": "daily",
"type": "websearch",
"domain": "GeneralNews",
"query": "latest UK news headlines",
"date_context": "month_year",
"max": 8
},
{
"name": "BBC News Front Page",
"enabled": true,
"cadence": "daily",
"type": "webtext",
"domain": "GeneralNews",
"url": "https://www.bbc.com/news",
"max_links": 8,
"words": 220
},
{
"name": "Monthly Europe Defence Headlines",
"enabled": true,
"cadence": "monthly",
"day_of_month": 1,
"type": "websearch",
"query": "europe defence industry headlines"
}
]
}
Notes
- •
monthlytasks run only whenrun_date.day == day_of_month. - •If
domainis omitted on a task,default_domainis used. - •Domain values must be alphabetic (A-Z, a-z), matching Gen2 skill constraints.
- •
websearchtasks can includedate_contextasnone,month_year, oryear. - •
websearch.dateis optional (YYYY-MM-DD). If omitted, the scheduler run date is passed through.
Run all company configs in one invocation
bash
python gen2_miner_schedule.py --config gen2_miner_schedule_SAAB_config.json --cadence daily --all-configs --inter-config-delay 10
This pays orchestration startup once, then executes all discovered company config files sequentially, with a fixed delay between configs.