title: "Cron Jobs"
Cron Jobs
Cron jobs are time-based scheduling tools used to automate repetitive tasks on Epycbyte. By using a specific syntax called a cron expression, you can define the frequency and timing of each task. This helps improve efficiency and ensures that important processes are performed consistently.
What Are Cron Jobs?
Cron jobs are automated tasks that run at predefined times. They are widely used for tasks such as:
- Backups and archiving
- Email and Slack notifications
- Updating subscription quantities
Epycbyte supports cron jobs for both Serverless and Edge Functions, allowing you to automate tasks with ease.
How Epycbyte Supports Cron Jobs
Epycbyte makes it simple to set up and manage cron jobs. You can add cron jobs through:
epycbyte.json- Build Output API
For example, an endpoint like https://*.epycbyte.app/api/cron can be used to trigger a cron job.
Common Use Cases
- Automating Backups
- Sending Email Notifications
- Updating Subscription Quantities
- Scheduling Social Media Updates
How to Add Cron Jobs
You can add cron jobs by defining them in your epycbyte.json file or using the Build Output API. Epycbyte supports the following cron expression format:
minute hour day_of_month month day_of_week
For example:
0 5 * * * *triggers at 5 minutes past the hour.* 5 * 5 * 5triggers every minute on the 5th day of the month.
Managing Cron Jobs
When managing cron jobs, consider:
- Duration: Define how often the job runs.
- Error Handling: Ensure tasks are retried if they fail.
- Deployments: Manage multiple environments with different schedules.
- Concurrency Control: Avoid overlapping tasks.
You can also run cron jobs locally for testing.
Usage and Pricing
For detailed information on usage limits, pricing, and deployment options, visit the Usage and Pricing page.
Cron Job Templates
- Cron OG Cards: A template for updating social media cards.
- Epycbyte Cron Job Example: A Next.js app that updates data at different intervals.
Get started in minutes by following the Quickstart guide.