> ## Documentation Index
> Fetch the complete documentation index at: https://pulze.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Task Scheduling

> Configure when and how often tasks run

## Overview

Task scheduling in Pulze provides flexible options for automating AI workflows. Configure tasks to run once, daily, weekly, monthly, or on custom schedules using cron expressions.

## Schedule Types

### One-time Tasks

Execute a task once at a specific date and time.

**Best For:**

* Deadline-driven deliverables
* One-off reports
* Special event responses
* Time-sensitive actions

**Configuration:**

* Select specific date
* Choose exact time
* Set timezone
* Task automatically completes after running

**Example Uses:**

* "Generate quarterly report on March 31st at 5 PM"
* "Send project summary at end of sprint"
* "Create year-end analysis on December 31st"

### Daily Tasks

Run a task every day at the same time.

**Best For:**

* Daily reports and summaries
* Regular monitoring
* Recurring analysis
* Daily content generation

**Configuration:**

* Set execution time
* Choose timezone
* Runs every 24 hours

**Example Uses:**

* "Daily sales summary at 9 AM"
* "Morning briefing at 8 AM"
* "End-of-day status report at 6 PM"

### Weekly Tasks

Execute tasks on specific days of the week.

**Best For:**

* Weekly summaries
* Recurring team updates
* Weekly content creation
* Periodic reviews

**Configuration:**

* Select days of the week (Monday-Sunday)
* Set execution time
* Choose timezone
* Multiple days can be selected

**Example Uses:**

* "Monday morning summary at 8 AM"
* "Mid-week check-in every Wednesday at noon"
* "Weekend planning on Fridays at 3 PM"
* "Monday, Wednesday, Friday reports"

### Monthly Tasks

Run tasks on specific day(s) of the month.

**Best For:**

* Monthly reports
* End-of-month processing
* Monthly summaries
* Recurring monthly activities

**Configuration:**

* Select day(s) of the month (1-31)
* Set execution time
* Choose timezone
* Handle month-end edge cases

**Example Uses:**

* "Monthly report on the 1st at 9 AM"
* "End-of-month summary on the 30th"
* "Mid-month check on the 15th"
* "Quarterly reports on specific dates"

**Note:** For months without certain days (e.g., February doesn't have day 31), the task won't run that month, or may run on the last day depending on configuration.

### Custom (Cron) Tasks

Use cron expressions for advanced scheduling.

**Best For:**

* Complex scheduling requirements
* Non-standard intervals
* Business hours restrictions
* Advanced automation needs

**Configuration:**

* Enter cron expression
* Validate syntax
* Preview next run times
* Set timezone

**Cron Expression Format:**

```
* * * * *
│ │ │ │ │
│ │ │ │ └─── Day of week (0-7, 0 and 7 are Sunday)
│ │ │ └────── Month (1-12)
│ │ └───────── Day of month (1-31)
│ └──────────── Hour (0-23)
└───────────── Minute (0-59)
```

**Example Cron Expressions:**

* `0 9 * * 1-5` - Every weekday at 9 AM
* `0 */4 * * *` - Every 4 hours
* `0 9 1 * *` - First day of every month at 9 AM
* `30 14 * * 0` - Every Sunday at 2:30 PM
* `0 9,12,15,18 * * *` - Four times a day (9 AM, 12 PM, 3 PM, 6 PM)

**Common Patterns:**

* Every hour: `0 * * * *`
* Every 30 minutes: `*/30 * * * *`
* Business hours only: `0 9-17 * * 1-5`
* Twice daily: `0 9,21 * * *`

## Timezone Considerations

### Setting Timezones

* All tasks use the timezone you specify
* Default to your account timezone
* Can be changed for each task
* Handles daylight saving time automatically

### Important Notes

<Info>
  **Daylight Saving Time**: Tasks automatically adjust for DST changes. A task scheduled for "9 AM local time" will run at 9 AM even after DST transitions.
</Info>

<Warning>
  **Timezone Awareness**: Ensure you select the correct timezone, especially for teams distributed across multiple time zones. Tasks run according to the configured timezone, not the user's current location.
</Warning>

## Configuring Schedules

### Initial Setup

When creating a task:

1. Choose schedule type
2. Configure type-specific settings
3. Set timezone
4. Review next run time
5. Save configuration

### Modifying Schedules

To change a task's schedule:

1. Open task details
2. Click edit or use menu (⋮)
3. Update schedule settings
4. Save changes
5. New schedule takes effect immediately

### Testing Schedules

Before finalizing:

* Review the "Next Run" time
* Verify timezone is correct
* Consider creating a one-time test task first
* Check that the schedule matches your intentions

## Next Run Time

The system displays when each task will next execute:

* Shown in your local timezone
* Updates automatically after each run
* Visible in task list and details
* Helps verify schedule is correct

### Calculating Next Run

For recurring tasks:

* System calculates next execution after each run
* Takes into account schedule type and settings
* Skips if date/time doesn't exist (e.g., Feb 31st)
* Continues with following valid date

## Best Practices

<Tip>
  **Start simple**: Begin with daily or weekly tasks before creating complex cron schedules.
</Tip>

<Tip>
  **Test thoroughly**: Create a one-time or near-term task to verify configuration before setting up long-term schedules.
</Tip>

<Tip>
  **Consider load**: Avoid scheduling many tasks at the exact same time to prevent resource contention.
</Tip>

<Tip>
  **Business hours**: For non-urgent tasks, schedule during business hours when you can monitor results.
</Tip>

<Tip>
  **Timezone clarity**: Document which timezone is used, especially for globally distributed teams.
</Tip>

## Common Scheduling Patterns

### Morning Briefing

**Schedule:** Daily at 8 AM
**Purpose:** Start day with summary
**Pattern:** Simple daily schedule

### End-of-Week Summary

**Schedule:** Friday at 5 PM
**Purpose:** Weekly wrap-up
**Pattern:** Weekly on specific day

### Business Hours Monitoring

**Schedule:** `0 9-17 * * 1-5` (every hour, weekdays only)
**Purpose:** Regular checks during work hours
**Pattern:** Cron expression

### Monthly Reports

**Schedule:** 1st of month at 9 AM
**Purpose:** Regular monthly summaries
**Pattern:** Monthly on specific date

### Off-Hours Processing

**Schedule:** Daily at 2 AM
**Purpose:** Heavy processing during low-traffic
**Pattern:** Daily at off-peak time

## Troubleshooting

### Task Not Running

If a scheduled task doesn't execute:

1. **Check Status**: Verify task is "Active"
2. **Review Next Run**: Confirm next run time is in the future
3. **Validate Schedule**: Ensure schedule configuration is correct
4. **Check Timezone**: Verify timezone setting
5. **Subscription**: Confirm organization subscription is active

### Unexpected Timing

If task runs at wrong time:

1. **Timezone**: Double-check timezone setting
2. **DST**: Consider daylight saving time transitions
3. **Cron Syntax**: Validate cron expression if using custom schedule
4. **Schedule Type**: Ensure correct schedule type is selected

### Skipped Executions

Some schedules may skip:

1. **Invalid Dates**: Monthly schedule for day 31 skips months with fewer days
2. **System Maintenance**: Rare scheduled maintenance windows
3. **Task Paused**: Task was paused during scheduled time
4. **Error State**: Previous execution error needs resolution

## Schedule Modification Impact

### Immediate Effect

Schedule changes take effect immediately:

* Next run time updates instantly
* Previous schedule no longer applies
* Pending executions use new schedule

### No Retroactive Running

Changing a schedule won't:

* Execute missed runs from old schedule
* Backfill skipped executions
* Modify execution history

<CardGroup cols={2}>
  <Card title="Tasks Overview" icon="clock" href="/pulze/tasks/overview">
    Back to Tasks Overview
  </Card>

  <Card title="Monitoring" icon="chart-line" href="/pulze/tasks/monitoring">
    Monitor task execution
  </Card>
</CardGroup>
