Skip to content

Feature for Scheduling Deployments #2

@rjsamra

Description

@rjsamra

Description:

It would be highly beneficial to introduce a feature that allows users to schedule deployments using the Laravel Deploy package. This feature would enable automated deployments at specified times, reducing manual intervention and ensuring deployments happen during off-peak hours or in maintenance windows.

Proposed Feature:

  1. Scheduling Interface:

    • Provide a CLI command to schedule deployments (e.g., php artisan deploy:schedule).
    • Allow users to specify the time, frequency, and deployment script to be executed.
  2. Support for Common Schedules:

    • Implement support for common cron-like schedules (e.g., daily, weekly, specific days of the week, etc.).
    • Include an option for custom cron expressions for advanced users.
  3. Integration with Task Scheduler:

    • Leverage Laravel's Task Scheduling capabilities to manage and execute the deployment schedule.
    • Ensure compatibility with existing Laravel cron setup (php artisan schedule:run).
  4. Notification System:

    • Optionally send notifications upon successful or failed scheduled deployments via email, Slack, or other channels.
    • Allow users to configure their preferred notification methods in the deploy.php config file.

Use Cases:

  • Automated Nightly Deployments: Schedule deployments to happen every night, minimizing disruption during peak hours.
  • Weekend Deployments: Set up deployments for weekends when traffic is typically lower.
  • Rolling Out Updates: Automatically deploy critical updates at specified intervals without manual input.

Benefits:

  • Efficiency: Reduces the need for manual deployment, especially for routine updates.
  • Reliability: Ensures deployments happen consistently and at the right time, minimizing the risk of human error.
  • Scalability: Supports environments where multiple deployments are needed across different schedules or branches.

Additional Considerations:

  • Ensure that scheduled deployments have proper error handling and rollback mechanisms.
  • Allow users to override or cancel scheduled deployments if needed.

References:

  • Consider similar scheduling features in other deployment tools for inspiration.
  • Leverage Laravel's built-in scheduling and notification systems for a seamless integration.

This issue template provides a comprehensive overview of the proposed feature, its benefits, and how it might be implemented. You can copy this into a new issue on your GitHub repository to track and discuss the feature request with your team or contributors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions