← 返回 Skills 市场
constx1337

Finance Cron

作者 constx1337 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
256
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install finance-cron
功能描述
Schedule and manage cron tasks that run only on official trading days for US, China, and Hong Kong financial markets with automatic holiday sync.
使用说明 (SKILL.md)

Finance Calendar

Trading-day calendar utilities for financial markets (US, CN, HK).

Overview

This skill provides trading-day-aware scheduling helpers. It helps you:

  • Check if a date is a trading day
  • Show upcoming trading days
  • Sync latest holiday calendar data
  • Plan when to schedule tasks (trading-day-aware)

Important: This skill identifies trading days and calculates optimal run times, but does NOT execute scheduled tasks. Use with /loop for actual task scheduling.

Commands

Check Trading Day

/finance-cron check \x3Cmarket> [date]

Check if a date is a trading day for a market.

Example:

/finance-cron check US           # Check today
/finance-cron check CN 2024-12-25  # Check specific date

Show Next Trading Days

/finance-cron next \x3Cmarket> [n]

Show next N trading days for a market.

Example:

/finance-cron next US 5  # Show next 5 US trading days

Sync Calendar

/finance-cron sync [market]

Sync latest trading calendar from data sources.

Example:

/finance-cron sync    # Sync all markets
/finance-cron sync US  # Sync US market only

Plan Task Schedule

/finance-cron add \x3Cmarket> \x3Ctime> \x3Ccommand>

Plan a trading-day-aware task and get the next execution time.

Note: This command calculates and displays when the task should run, but does NOT execute it. To actually run tasks on schedule, combine with /loop:

Example workflow:

# First, plan the task
/finance-cron add US 09:30 echo "US market opening"
# Output: Next Run: 2024-01-15 (Mon) 09:30

# Then, use /loop for actual scheduling
/loop 0 9 * * 1-5 /finance-cron check US && echo "US market opening"

List Planned Tasks

/finance-cron list

List all planned tasks with their next scheduled times.

Markets

Code Name Exchanges Timezone Hours
US US Stock Market NYSE, NASDAQ America/New_York 09:30-16:00
CN China A-Share SSE, SZSE Asia/Shanghai 09:30-15:00
HK Hong Kong HKEX Asia/Hong_Kong 09:30-16:00

Integration with /loop

For actual scheduled execution, use /loop with trading day checks:

# Run command only on US trading days at 9:30 AM
/loop 30 9 * * 1-5 /finance-cron check US --quiet && your_command

# The --quiet flag (if implemented) would suppress output for clean scheduling

API for Other Skills

This skill also exports programmatic APIs:

import { isTradingDay, getNextTradingDay, getDueTasks } from 'finance-cron';

// Check if today is a US trading day
const canTrade = isTradingDay('US');

// Get next US trading day
const nextDay = getNextTradingDay('US');

// Get tasks due for execution (for external schedulers)
const dueTasks = getDueTasks();
安全使用建议
This skill appears coherent and implements exactly what it promises: trading-day checks, planning, and local calendar sync. Things to consider before installing: (1) Calendar sync calls a bundled Python script via child_process — to enable full sync you must install the Python dependencies listed in requirements.txt; if those libraries are not present the skill falls back to local JSON files. (2) The skill writes/updates files under its ./data directory (us/cn/hk JSON), so ensure you are comfortable with those local writes. (3) The skill itself does not execute scheduled commands; when you combine it with /loop (or another scheduler) that scheduler will run whatever shell command you provide — be careful what commands you schedule. (4) If you rely on automatic syncing, audit any third-party Python packages you install (pandas_market_calendars, exchange_calendars, chinese_calendar) and install them from trusted sources. Overall, there are no requests for secrets or unexpected network endpoints in the code.
功能分析
Type: OpenClaw Skill Name: finance-cron Version: 1.0.1 The finance-cron skill provides trading-day calendar utilities and scheduling helpers for US, CN, and HK markets. The code implements its stated functionality through a TypeScript core and a Python synchronization script (scripts/sync_calendars.py) that fetches holiday data. It includes proper input validation (e.g., whitelisting market codes in src/index.ts) before passing arguments to shell commands, and it does not perform any unauthorized data exfiltration, persistence, or command execution.
能力评估
Purpose & Capability
Name/description (trading-day-aware cron helpers for US/CN/HK) matches the code: calendar manager, scheduler, syncer, and data files. Required capabilities (reading local holiday JSON, calculating next trading days, planning tasks) are implemented and proportionate.
Instruction Scope
SKILL.md limits the skill to checking trading days, listing/adding planned tasks, and syncing calendars. The runtime code follows that scope — it reads local data files, calculates schedules, and exposes APIs. It does not attempt to read unrelated system files or environment variables. The skill explicitly does not execute user commands itself and instructs users to combine with /loop for execution.
Install Mechanism
There is no install spec in the registry (instruction-only), but the package contains Node source, package.json, and a Python sync script with a requirements.txt. Sync functionality requires Python libraries (pandas_market_calendars, exchange_calendars, chinese_calendar) which are not automatically installed by the skill — the README and requirements.txt document this. This is a usability note rather than a security concern; no arbitrary remote downloads or extract-from-URL install steps are present.
Credentials
The skill declares no required environment variables, no credentials, and no config paths other than its own ./data files. The code does not attempt to access unrelated secrets. The only external execution is running the bundled Python script; arguments are restricted to validated market codes ('US','CN','HK') before being used.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or global agent settings. It writes/updates its own data files under ./data (calendar JSON files) which is appropriate for its purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install finance-cron
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /finance-cron 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Renamed and clarified skill for broader calendar utility and integration. - Renamed from "Finance Cron" to "Finance Calendar" to reflect its purpose as a trading-day calendar helper. - Clarified that the skill does not execute tasks itself—use `/loop` for actual task execution. - Reorganized documentation for better readability and step-by-step task planning with scheduling examples. - Provided command examples for integration with schedulers like `/loop`. - Added API usage documentation for integration with other skills or apps. - General improvements to feature explanations and usage guidance.
v1.0.0
- Initial release of Finance Cron. - Schedule tasks to run only on real trading days, with support for US, China, and Hong Kong markets. - Automatic syncing of trading calendars, including holidays and special Chinese A-share workday adjustments. - Add, list, and check trading-day cron tasks via simple commands. - Commands to check trading days, show upcoming sessions, and sync calendars for supported markets.
元数据
Slug finance-cron
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Finance Cron 是什么?

Schedule and manage cron tasks that run only on official trading days for US, China, and Hong Kong financial markets with automatic holiday sync. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 256 次。

如何安装 Finance Cron?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install finance-cron」即可一键安装,无需额外配置。

Finance Cron 是免费的吗?

是的,Finance Cron 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Finance Cron 支持哪些平台?

Finance Cron 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Finance Cron?

由 constx1337(@constx1337)开发并维护,当前版本 v1.0.1。

💬 留言讨论