Can Grain run a job every hour or week?
Apps can include scheduled jobs. Define the timing in the application and provide visible success, error and recovery states for the operator.
Grain / Use cases / Scheduled jobs and small automations that keep running
Use case
You have a small task that should run hourly, nightly or weekly, but the agent's script stops when its terminal closes. Grain can keep an app artifact published with Postgres and a scheduled job, while a visible page gives an operator a place to inspect what happened.
Build a weekly account-review digest. Store account names, review dates and processing state in Postgres. Require login. Every Monday morning, run a scheduled job that finds reviews due in the next seven days and writes a digest record. Create an operator page showing the last successful run, included accounts, skipped rows and errors. Make reruns idempotent. Do not send email or call an external service.grain login
mkdir account-review-digest
cd account-review-digest
grain init
# Give the agent the scheduled-job prompt and test records.
grain push
grain checkpoint -m "weekly digest verified"
grain share --password <pw>
# Use invited-person sharing for named operators.Download the Mac app before the CLI sequence. Use a full app because the job requires durable inputs, run records and an operator view. Postgres stores the account rows and execution state. Login and a restricted share protect the operator surface. The scheduled job runs weekly, while the page shows last success, included rows, skips and errors. Start with the default https://<slug>.share.rungrain.com address. Pro adds CNAME custom domains if a company URL is required. Verify the schedule, database mutations, idempotency, access boundary and visible failure path independently before depending on the automation.
grain pull.Use a controlled run as proof. Insert three due accounts, one future account and one invalid row. Run the job at the planned boundary, reconcile the digest, then run it again and verify that no duplicates appear. Sign out and confirm the login boundary. Leave an operator comment and verify the agent can read it. Close the authoring session and inspect the next scheduled result from the same URL. Grain supports Postgres, login and scheduled jobs in app artifacts, and published artifacts stay published on the free tier. The job's correctness is still the responsibility of its code, test cases and human owner. A visible run record is evidence; the presence of a schedule alone is not.
Apps can include scheduled jobs. Define the timing in the application and provide visible success, error and recovery states for the operator.
Published artifacts stay published after the session, including the database and scheduled jobs behind them.
Ask the agent for an idempotency rule backed by persistent state, then execute the same fixture twice and reconcile the stored results.
Yes. Full app artifacts can have login, and sharing can be password-protected or limited to invited people.
No. Grain keeps an app artifact and its scheduled jobs running. It does not schedule agent reasoning or coordinate agents.
Download the free Mac app, define the owner and failure path, then test the job twice before relying on it.
Free forever. No card. Bring your own agent.