Skip to content

Replace fixed cron jobs with dynamic cron job array in deploy.php #20

@kevinsleegerslameco

Description

@kevinsleegerslameco

Update the cron job management in deployment scripts to remove hardcoded (fixed) cron jobs. Instead, provide an option for users to define their cron jobs directly in the deploy.php file as a simple array. The array should accept configurations for the schedule (time) and the actual command to run. The process should automatically handle setting the working directory (e.g., using "cd {{current_path}}"), so users do not have to specify it manually in their commands.

  • Remove all fixed/legacy cron job entries from the deployment process.
  • Allow users to declare jobs like: ['* * * * *', 'php craft queue/run'] or similar associative array format.
  • Ensure the system prepends the appropriate "cd {{current_path}} &&" to each command.
  • Update documentation/examples to show the new configuration method in deploy.php.
  • Ensure backward compatibility is documented or provide a migration path if needed.

This will make cron management more flexible and user-friendly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions