Documentation
Cron Jobs - Automated Task Scheduling
Schedule and automate HTTP requests to your services with deployra's powerful cron job system. Perfect for periodic tasks, data processing, notifications, and maintenance operations.
What are Cron Jobs?
Deployra Cron Jobs enable you to schedule automated HTTP requests to your services at specific intervals. This powerful feature transforms your applications into self-managing systems that can perform routine tasks without manual intervention.
Data Processing
Automate ETL operations, data cleanup, and batch processing tasks
Notifications & Reports
Send scheduled emails, alerts, and generate periodic reports
Cache Management
Refresh cached data, clear temporary files, and optimize performance
Database Maintenance
Run backups, optimize indexes, and perform routine maintenance
API Integrations
Sync data with external services and update third-party systems
Scheduled Tasks
Execute any recurring task that can be triggered via HTTP endpoint

deployra Cron Job Interface: Configure schedules, HTTP methods, URLs, and monitoring settings through our intuitive dashboard.
How Cron Jobs Work
Set up a schedule using cron syntax (e.g., 0 * * * *
for hourly) or select from preset intervals.
Configure the HTTP method, URL, headers, and payload that will be sent to your service.
Deployra automatically sends the configured request to your service at the scheduled times.
Creating a Cron Job
Navigate to your service
Go to your service's dashboard in the Deployra platform
Select "Cron Jobs" from the sidebar
Find the Cron Jobs section in your service's navigation menu
Click "Create Cron Job"
Open the form to configure a new cron job
Configure your cron job
Set up the schedule, HTTP method, URL path, and other options
Save and activate
Your cron job will start running according to the schedule you set
Cron Schedule Syntax
*/5 * * * *
Every 5 minutes0 * * * *
Every hour0 0 * * *
Every day at midnight0 9 * * 1-5
Weekdays at 9:00 AM0 0 1 * *
First day of month at midnightBest Practices
Use dedicated endpoints
Create specific routes in your application for cron job operations. This makes monitoring and debugging easier.
Add authentication
Use custom headers for authentication to ensure only your cron jobs can trigger these endpoints.
Monitor job execution
Check the cron job logs regularly to ensure jobs are running successfully.
Implement idempotency
Design your endpoints to handle repeated calls gracefully, in case a job runs multiple times.
Frequently Asked Questions
What is the minimum interval for cron jobs?
The minimum interval between cron job executions is 5 minutes. This prevents excessive resource usage and ensures system stability. For tasks requiring higher frequency, consider implementing them within your application using internal schedulers.
How do I handle authentication for cron job endpoints?
Use custom headers or API keys to authenticate cron job requests. You can configure custom headers in the cron job settings, such as X-Cron-Secret: your-secret-key
. Validate this header in your endpoint to ensure only authorized cron jobs can trigger your tasks.
What happens if my cron job fails?
deployra automatically retries failed cron jobs with exponential backoff. You can monitor job execution status and logs in the cron jobs dashboard. Failed jobs are logged with error details to help you troubleshoot and fix issues.
Can I schedule cron jobs in my local timezone?
All cron jobs execute in UTC timezone. You need to convert your local time to UTC when setting schedules. For example, if you want a job to run at 9 AM EST, set it for 2 PM UTC (14:00). This ensures consistent execution regardless of server location.
How many cron jobs can I create per service?
The number of cron jobs depends on your deployra plan. Free tier allows up to 3 cron jobs per service, while paid plans offer higher limits. Check your dashboard for current usage and upgrade options if you need more cron jobs.
What HTTP methods are supported for cron jobs?
deployra cron jobs currently support GET requests only. You can configure custom headers and query parameters for each cron job to match your endpoint requirements. If you need to trigger POST, PUT, or other HTTP methods, design your GET endpoint to initiate those operations internally.