What is a cron job, and how to run one without a server
A cron job is a task a computer runs on a timetable. Learn to read cron schedules, then have your AI agent run your job 24/7 on aidrop.it, no server needed.
A cron job is a task a computer runs by itself on a timetable: every morning at 9, every 15 minutes, every Monday. The name comes from cron, a program on Linux and macOS that keeps a list of such tasks and starts each one on time. To run one without a server or a laptop left on, have your AI agent build a small always-on app that keeps its own timetable, and put it on aidrop.it. It takes about 20 minutes.
How to read a cron schedule
A cron job has two parts: when it runs, and what it does. The “when” is a cron expression: five values separated by spaces. In order, they are the minute, the hour, the day of the month, the month and the day of the week. A star means “any”.
| Cron expression | What it means |
|---|---|
*/15 * * * * |
Every 15 minutes |
0 9 * * * |
Every day at 9:00 in the morning |
30 8 * * 1-5 |
At 8:30 in the morning, Monday to Friday |
0 0 1 * * |
At midnight on the first day of every month |
0 18 * * 0 |
Every Sunday at 6 in the evening (0 and 7 both mean Sunday) |
Two catches trip people up. First, if you set both a day of the month and a day
of the week, the job runs when either one matches: 0 9 1 * 1 runs on the 1st
and on every Monday
(crontab manual).
Second, servers usually keep UTC time, which is London’s winter time. “9:00”
means 9:00 UTC unless the job is told your time zone.
What you will have at the end
- Your task running on its timetable, around the clock, with your laptop closed.
- A record of every run: when it started, whether it worked, and what went wrong if not.
- A message to you, by email or in Slack, when a run fails.
- The code in a repository, so your agent can change the task or the timetable later.
Words you will meet
- Scheduler — the part of the app that watches the clock and starts the task on time.
- Always-on app — a small program that keeps running on aidrop.it, where it is called a Service.
- “I’m alive” page — a tiny web page aidrop.it opens to see the app is still running. Even a job with no website needs one.
- Database — where the app notes each run, so the record survives restarts.
- Secret — a private value, like an API key, saved in your aidrop.it project and handed to the app when it runs. It never goes into the code.
How scheduled jobs work on aidrop.it
aidrop.it has no separate “scheduled jobs” feature. Your job runs inside an always-on app, deployed like any other app, which keeps its own timetable. What that means for you:
- Exactly one copy runs, so the same run never happens twice.
- A run due while the app restarts or updates can be missed. The fix: the app notes each finished run in its database and, when it starts, runs any it missed.
- The app’s own disk is wiped on every restart. Anything worth keeping goes in the database.
- The app is on all the time, so it takes up its size all the time.
What you need
- An aidrop.it account with your agent connected. The Quickstart shows how.
- A plan with a database, so runs are recorded and missed runs caught up: Trial, or Pro and above. Starter has no database; it can run a job that keeps no record.
- Keys for the services your task uses. For alerts, an email service such as Resend or a Slack incoming webhook; old-style email sending does not work on aidrop.it.
Say this to your agent
Build me a scheduled job and run it on aidrop.it. Use myexisting aidrop.it Project, or create one called "Scheduledjobs" if I have none.
The job: <say what and when, e.g. "every weekday at 8:30 amNew York time, fetch yesterday's orders from my store's APIand post a summary to Slack">.
- aidrop.it has no cron feature. Build one always-on app with an in-process scheduler (node-cron, APScheduler, or supercronic for shell commands) plus a small HTTP health endpoint. Read aidrop.it's runtime rules first, follow them.- Set my time zone in the scheduler explicitly; do not rely on the server clock's zone.- Never start a run while the previous one is still going.- Record every run in the Project's PostgreSQL: start, end, status, error. On startup, if a run was missed, run once.- If a run fails, alert me over HTTPS (email API or Slack webhook). SMTP does not work on aidrop.it.- Keys are Project secrets. Tell me the names to save and wait until I confirm. Never ask me to paste values in this chat.
Build it, check it runs, do one test run, then tell me theschedule in plain words and when the next run is due.What your agent does
- Picks your project, checks for a database, and asks you before creating one.
- Tells you which secrets to save, and waits.
- Writes the app: the task, the timetable, the run record and the “I’m alive” page.
- Saves the code to a repository on aidrop.it, builds it and checks it runs. If not, it reads the error, fixes it and builds again.
- Does one test run and tells you when the next real one is due.
Check that it works
- The next run time your agent reports matches what you wanted, in your time zone.
- The test run did its job: the message arrived, or the report appeared.
- Ask your agent “show me the last five runs”. It reads them from the database.
- Ask your agent to make one test run fail on purpose. The alert reaches you.
When something goes wrong
| What you see | What to tell your agent |
|---|---|
| The job runs hours early or late | “Schedule it in my time zone,” and name your city. |
| A run was skipped during an update | “On startup, check the last successful run and catch up if one was missed.” |
| aidrop.it says the app is not running, though the job works | “Add a small ‘I’m alive’ page that answers quickly, and build again.” |
| The same run happened twice | “Make sure only one scheduler starts, and skip a run while the last one is going.” |
| Failure emails never arrive | “Send alerts through an email service’s web API, not SMTP.” |
FAQ
What is the difference between cron, a cron job and a crontab?
Cron is the program that keeps time and starts tasks. A cron job is one task in its list: a schedule plus a command. A crontab, short for “cron table”, is the file that holds the list, one job per line. People say “cron job” for any scheduled task, even when no cron program is involved.
How do I write a cron expression for every 5 minutes?
Write */5 * * * *. The first value is the minute, and */5 means “every
fifth minute”; the stars mean any hour, day, month and weekday. To check an
expression, paste it into crontab.guru, which reads it
back in plain words.
Can I run a cron job for free?
Often, with limits. GitHub Actions runs workflows on a cron schedule, but runs can be delayed or dropped at busy times, the shortest gap is 5 minutes, and schedules in public repositories pause after 60 days without activity. For jobs where a late run does no harm, that is often enough.
Do I need my own server to run a cron job?
No. The job needs a computer that is always on, not one of your own. On aidrop.it your AI agent builds the job as a small always-on app, deploys it and checks it runs. You describe the task and timetable in plain words; the agent turns them into a cron expression.