scheduled-job-best-practices

Build scheduled non-interactive OpenCode jobs with idempotent outputs and preflight checks.

10|Updated Nov 29, 2025
One-click install
npx skills add https://github.com/benjaminshafii/digital-empire --skill scheduled-job-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scheduled-job-best-practices
Source: https://github.com/benjaminshafii/digital-empire/tree/main/.opencode/skill/scheduled-job-best-practices
Command: npx skills add https://github.com/benjaminshafii/digital-empire --skill scheduled-job-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a disciplined approach to building scheduled, non-interactive OpenCode jobs, eliminating fragile ad-hoc scripts and inconsistent runtimes.

Core Features & Use Cases

  • No magic injection: compute runtime values (bash) during run rather than assuming placeholders.
  • Non-interactive: scheduled tasks run without manual steps, QR codes, logins, or confirmations.
  • Idempotent: reruns are safe by maintaining an outputs/ state to prevent duplicates.
  • Observable: end-of-run status summary and key outputs are produced for traceability.
  • Minimal side effects: artifacts and results are written under outputs/ in the job workdir.
  • Preflight & governance: verify required tools and environment variables before execution.

Quick Start

Put the line @scheduled-job-best-practices at the very top of any scheduled job prompt, then write your task below it.

Frequently Asked Questions about scheduled-job-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make scheduled jobs safe and repeatable without manual intervention?

To make scheduled jobs safe and repeatable, you must eliminate manual steps and ensure reruns do not produce duplicates. This approach uses an outputs/ state directory to maintain idempotency and prevent side effects during non-interactive execution.

What is the best way to add observability to non-interactive automation tasks?

Observability for non-interactive automation tasks is achieved by generating an end-of-run status summary and capturing key outputs. This traceability ensures you can verify execution results without monitoring the process live.

Why do my scheduled jobs fail due to missing environment variables or tools at runtime?

Scheduled jobs fail at runtime when required tools or environment variables are missing. Implementing a preflight governance step verifies all dependencies and configurations before execution begins, preventing mid-run failures.

How do I handle dynamic values in scheduled jobs without hardcoding placeholders?

Handle dynamic values in scheduled jobs by computing runtime values using bash during execution rather than assuming static placeholders. This no-magic-injection approach ensures the job adapts to the actual environment at run time.

Can I run scheduled jobs without user logins, QR codes, or manual confirmations?

Yes, you can run scheduled jobs completely non-interactively without logins, QR codes, or manual confirmations. This Skill is specifically designed for non-interactive execution, allowing tasks to run autonomously without human input.

What are the limitations of using ad-hoc scripts for scheduled task automation?

Ad-hoc scripts for scheduled task automation are fragile and lead to inconsistent runtimes. Without idempotent state management and preflight checks, they risk duplicate side effects and untraceable failures during non-interactive execution.