Scheduling Basics
Scheduling Basics
Section titled “Scheduling Basics”Scheduling is at the heart of automation in Querri. Whether you’re refreshing dashboards, sending reports, or executing recurring analysis, understanding how to set up schedules properly is essential. This guide will teach you everything you need to know.
Understanding Schedules
Section titled “Understanding Schedules”A schedule defines when and how often an automated task should run. In Querri, you can create schedules for:
- Dashboard refreshes
- Email report delivery
- Data exports
- Step execution in projects
- Data source synchronization
Frequency Options
Section titled “Frequency Options”Querri provides both simple frequency options and advanced cron expressions.
Simple Frequency Options
Section titled “Simple Frequency Options”For common scheduling needs, use the simple frequency picker:
Hourly:
Runs: Every hourExample: On the hour, every hour (1:00, 2:00, 3:00...)Best for: Real-time dashboards, operational monitoringDaily:
Runs: Once per day at a specified timeExample: Every day at 8:00 AMBest for: Morning reports, daily summariesWeekly:
Runs: Once per week on specified day(s)Example: Every Monday at 9:00 AMBest for: Weekly team meetings, progress reportsMonthly:
Runs: Once per month on a specified dayExample: 1st of each month at 10:00 AMBest for: Monthly business reviews, invoicingCustom:
Runs: Based on a cron expressionExample: Multiple times per day, specific days, complex patternsBest for: Advanced scheduling needsChoosing the Right Frequency
Section titled “Choosing the Right Frequency”Consider these factors:
Data Update Frequency:
- If your data updates hourly, don’t schedule more frequently than hourly
- If your data updates daily, daily or weekly schedules are appropriate
Audience Needs:
- Executives: Daily or weekly summaries
- Operations teams: Hourly or real-time updates
- Analysts: On-demand or daily refreshes
Resource Constraints:
- More frequent schedules use more resources
- Consider database query limits
- Balance timeliness with cost
Cron Expressions Explained
Section titled “Cron Expressions Explained”For advanced scheduling, Querri uses cron expressions. A cron expression is a string that represents a schedule.
Cron Format
Section titled “Cron Format”* * * * *│ │ │ │ ││ │ │ │ └─── Day of week (0-7, where 0 and 7 are Sunday)│ │ │ └───── Month (1-12)│ │ └─────── Day of month (1-31)│ └───────── Hour (0-23)└─────────── Minute (0-59)Special Characters
Section titled “Special Characters”Asterisk (*): Matches any value
* * * * * = Every minute of every dayComma (,): Specifies multiple values
0 9,12,17 * * * = At 9:00 AM, 12:00 PM, and 5:00 PM every dayHyphen (-): Specifies a range
0 9-17 * * * = Every hour from 9:00 AM to 5:00 PMSlash (/): Specifies increments
*/15 * * * * = Every 15 minutes0 */4 * * * = Every 4 hours (at 0:00, 4:00, 8:00, 12:00, 16:00, 20:00)Question mark (?): Used in day fields when the other day field is specified
0 9 ? * MON = Every Monday at 9:00 AMCommon Cron Examples
Section titled “Common Cron Examples”Every minute:
* * * * *Every hour at minute 0:
0 * * * *Example: 1:00, 2:00, 3:00...Every day at 8:00 AM:
0 8 * * *Every Monday at 9:00 AM:
0 9 * * 1Every weekday at 6:00 AM:
0 6 * * 1-5Every 15 minutes:
*/15 * * * *Example: :00, :15, :30, :45Twice a day (9 AM and 5 PM):
0 9,17 * * *First day of every month at 10:00 AM:
0 10 1 * *Last day of every month (requires special handling):
0 10 28-31 * *Note: Will run on days 28-31, check in logic if it's actually the last dayEvery 6 hours:
0 */6 * * *Example: Midnight, 6 AM, 12 PM, 6 PMBusiness hours: Every hour from 9 AM to 5 PM on weekdays:
0 9-17 * * 1-5Start of every quarter (Jan 1, Apr 1, Jul 1, Oct 1) at midnight:
0 0 1 1,4,7,10 *Named Values
Section titled “Named Values”For readability, you can use names instead of numbers:
Months:
JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
Example:0 9 1 JAN,APR,JUL,OCT *Every quarter on the 1st at 9:00 AMDays of week:
SUN, MON, TUE, WED, THU, FRI, SAT
Example:0 9 * * MON-FRIEvery weekday at 9:00 AMTesting Cron Expressions
Section titled “Testing Cron Expressions”Before activating a schedule, test your cron expression:
- Use the Querri cron tester: Built into the scheduling interface
- Check next run times: See the next 5 scheduled executions
- Verify the pattern: Ensure it matches your intent
Example:
Expression: 0 9 * * MONNext runs:• Monday, January 22, 2024 at 9:00 AM• Monday, January 29, 2024 at 9:00 AM• Monday, February 5, 2024 at 9:00 AM• Monday, February 12, 2024 at 9:00 AM• Monday, February 19, 2024 at 9:00 AMTimezone Settings
Section titled “Timezone Settings”Timezones are critical for ensuring schedules run at the correct local time.
Setting the Timezone
Section titled “Setting the Timezone”When creating a schedule:
- Select timezone: Choose from a list of standard timezones
- Consider your audience: Use the timezone where most users are located
- Use UTC for global teams: Avoids confusion across timezones
Common Timezones
Section titled “Common Timezones”US Timezones:
America/New_York (Eastern Time)America/Chicago (Central Time)America/Denver (Mountain Time)America/Los_Angeles (Pacific Time)European Timezones:
Europe/London (GMT/BST)Europe/Paris (Central European Time)Europe/Berlin (Central European Time)Asia Pacific Timezones:
Asia/Tokyo (Japan Standard Time)Asia/Singapore (Singapore Time)Australia/Sydney (Australian Eastern Time)UTC:
UTC (Coordinated Universal Time)Best for: Global teams, avoiding DST issuesDaylight Saving Time
Section titled “Daylight Saving Time”Querri automatically handles daylight saving time transitions:
Example:
Schedule: Every day at 9:00 AM America/New_York• Winter: Runs at 9:00 AM EST (UTC-5)• Summer: Runs at 9:00 AM EDT (UTC-4)• The schedule automatically adjusts on DST transition datesBest practices:
- Use named timezones (e.g., “America/New_York”) instead of offsets (e.g., “UTC-5”)
- Named timezones automatically handle DST
- Document which timezone you’re using for each schedule
Multiple Timezone Schedules
Section titled “Multiple Timezone Schedules”For global audiences, create separate schedules:
Morning Report - Americas:Schedule: 0 8 * * 1-5Timezone: America/New_YorkRecipients: US team
Morning Report - Europe:Schedule: 0 8 * * 1-5Timezone: Europe/LondonRecipients: EU team
Morning Report - Asia Pacific:Schedule: 0 8 * * 1-5Timezone: Asia/SingaporeRecipients: APAC teamCreating Schedules
Section titled “Creating Schedules”Step-by-Step Schedule Creation
Section titled “Step-by-Step Schedule Creation”1. Navigate to automation settings:
- Go to your dashboard or project
- Click on “Automation” or “Schedules”
2. Create a new schedule:
- Click “New Schedule”
- Give it a descriptive name
3. Choose frequency:
- Select simple frequency option, or
- Enter a custom cron expression
4. Set timezone:
- Choose the appropriate timezone
- Preview next run times
5. Configure additional options:
- Set start date (when schedule becomes active)
- Set end date (optional, when schedule should stop)
- Enable/disable the schedule
6. Test the schedule:
- Review next execution times
- Verify the pattern matches your needs
7. Activate:
- Save and enable the schedule
Schedule Naming Best Practices
Section titled “Schedule Naming Best Practices”Use clear, descriptive names:
Good names:
Daily Sales Report - 8AM ESTWeekly Team Dashboard Refresh - Monday 9AMHourly Operations MonitoringMonthly Executive Summary - 1st at 10AMPoor names:
Schedule 1Dashboard RefreshReportAutomationInclude:
- What: What is being automated
- When: Frequency and time
- Who: Target audience (if relevant)
Advanced Scheduling Patterns
Section titled “Advanced Scheduling Patterns”Combining Multiple Conditions
Section titled “Combining Multiple Conditions”Every 15 minutes during business hours on weekdays:
*/15 9-17 * * 1-5Runs: :00, :15, :30, :45 past each hour from 9 AM to 5 PM, Monday-FridayFirst and last day of each month:
Two schedules needed:1. 0 9 1 * * (First day)2. 0 9 28-31 * * (Last day, with logic to check if it's actually the last day)Quarterly reports on 15th of Jan, Apr, Jul, Oct:
0 10 15 1,4,7,10 *Different times for different days:
Requires multiple schedules:1. 0 8 * * 1-4 (Mon-Thu at 8 AM)2. 0 9 * * 5 (Fri at 9 AM)Avoiding Common Mistakes
Section titled “Avoiding Common Mistakes”Mistake 1: Too frequent:
Wrong: * * * * * (every minute)Better: */5 * * * * (every 5 minutes) or less frequentMistake 2: Invalid day combinations:
Wrong: 0 9 31 2 * (Feb 31st doesn't exist)Better: 0 9 28 2 * (Feb 28th) or use end-of-month logicMistake 3: Forgetting timezones:
Wrong: Creating schedule without specifying timezoneBetter: Always explicitly set the timezoneMistake 4: Off-by-one errors:
Wrong: 0 9 0 * * (Day 0 doesn't exist)Better: 0 9 1 * * (Day 1 is the first of the month)Monitoring Schedules
Section titled “Monitoring Schedules”Checking Schedule Status
Section titled “Checking Schedule Status”View your active schedules:
- Next run time: When the schedule will execute next
- Last run time: When it last executed
- Last run status: Success or failure
- Enabled/Disabled: Whether the schedule is active
Editing Schedules
Section titled “Editing Schedules”You can modify schedules at any time:
- Change frequency: Update the cron expression
- Change timezone: Adjust for different audience
- Update settings: Modify what happens when schedule runs
- Pause schedule: Temporarily disable without deleting
Deleting Schedules
Section titled “Deleting Schedules”Remove schedules you no longer need:
- Find the schedule in the list
- Click “Delete” or “Remove”
- Confirm the deletion
- Past execution history is preserved
Troubleshooting
Section titled “Troubleshooting”Schedule Not Running
Section titled “Schedule Not Running”Check these items:
- Is the schedule enabled?
- Is the start date in the past?
- Has the end date passed?
- Is the cron expression valid?
- Are there any execution errors?
Unexpected Run Times
Section titled “Unexpected Run Times”Verify:
- Timezone is set correctly
- Cron expression matches your intent
- Daylight saving time isn’t causing confusion
- System clock is accurate
Performance Issues
Section titled “Performance Issues”If schedules are slow:
- Check if multiple schedules run simultaneously
- Optimize queries in the scheduled task
- Stagger schedules to distribute load
- Consider caching for frequently accessed data
Best Practices
Section titled “Best Practices”- Start with simple frequencies: Use hourly, daily, weekly unless you need custom patterns
- Test before activating: Always preview next run times
- Document your schedules: Include why each schedule exists
- Monitor execution: Regularly check that schedules are running successfully
- Clean up old schedules: Remove schedules that are no longer needed
- Use descriptive names: Make it easy to understand what each schedule does
- Consider costs: More frequent schedules consume more resources
- Set end dates for temporary schedules: Prevent them from running indefinitely
Quick Reference
Section titled “Quick Reference”Common Patterns Cheat Sheet
Section titled “Common Patterns Cheat Sheet”Every hour: 0 * * * *Every day at 8 AM: 0 8 * * *Every Monday at 9 AM: 0 9 * * 1Every weekday at 6AM: 0 6 * * 1-5Every 15 minutes: */15 * * * *Twice daily: 0 9,17 * * *First of month: 0 10 1 * *Every 6 hours: 0 */6 * * *Business hours: 0 9-17 * * 1-5Start of quarter: 0 0 1 1,4,7,10 *Next Steps
Section titled “Next Steps”- Automated Reports - Set up email reports with schedules
- Recurring Analysis - Automate project step execution
- Monitoring Automations - Track your scheduled tasks
Master scheduling to unlock the full power of automation in Querri!