Skip to content

Cron Jobs Improvements for FlyEnv#674

Merged
xpf0000 merged 2 commits into
xpf0000:masterfrom
ibraimfarag:master
May 18, 2026
Merged

Cron Jobs Improvements for FlyEnv#674
xpf0000 merged 2 commits into
xpf0000:masterfrom
ibraimfarag:master

Conversation

@ibraimfarag

Copy link
Copy Markdown
Contributor

Cron Jobs Improvements for FlyEnv

image

Overview

This update improves the Cron Jobs experience inside FlyEnv, especially for local development and testing on Windows.

Why This Update Matters

As a Laravel/PHP developer, I need to test Cron Jobs locally on Windows before deploying to production.

I also rely on scheduled automation tasks that should run at specific times, and I need to verify behavior early (success/failure, command output, and timing) before pushing code.

What Was Added

image

1) Cron Jobs Core Behavior

  • Fixed storage initialization issue for first-time usage (ENOENT on cron-jobs.json).
  • Added automatic creation of the .flyenv storage directory before writing Cron data.
  • Improved Work Directory handling in Add/Edit dialog:
    • Defaults to website root.
    • Still editable.
    • Reset and save behavior keeps a safe fallback.
image image image

2) Scheduler and Runtime Metadata

  • Added internal scheduler logic in the Cron module.
  • Added automatic run metadata updates:
    • lastRunTime
    • nextRunTime
    • lastOutput
    • lastError
    • lastExitCode
  • Added immediate run support for manual testing with persisted results.

3) UI/UX Enhancements

  • Simplified Cron header and top close button layout.
  • Improved translation fallback handling for stat labels.
  • Added real-time list refresh polling so run times update without manual refresh.
  • Added visual status icons:
    • Success icon when the last run exits with code 0.
    • Failed icon when the last run exits with non-zero code.
    • Paused icon for disabled or not-yet-run jobs.
  • Replaced action text labels with action icons (run, edit, delete).
  • Added dedicated action icon to open full execution output.

4) Output Visibility

  • Added output viewing dialog from Actions.
  • Shows complete run details:
    • Job name
    • Command
    • Exit code
    • Duration
    • Last run timestamp
    • Full STDOUT
    • Full STDERR

Developer Workflow (Laravel/PHP on Windows)

This update supports the following local workflow:

  1. Create and edit Cron Jobs for Laravel/PHP commands.
  2. Test schedules and commands locally on Windows.
  3. Validate timing and execution status before deployment.
  4. Inspect full output/errors directly from the app.
  5. Deploy with higher confidence after local verification.

Notes

  • This is focused on local development/testing reliability.
  • The goal is to catch schedule/output issues early and reduce production surprises.

- Added French, Croatian, Hungarian, Indonesian, Italian, Japanese, Dutch, Norwegian, Polish, Brazilian Portuguese, Portuguese, Romanian, Russian, Swedish, Turkish, Ukrainian, Vietnamese, Traditional Chinese, and Simplified Chinese translations for scheduled tasks.
- Each language includes keys for task management actions such as add, edit, delete, and placeholders for user input.
- Updated language index files to include the new cron translations.
- Implemented ListTable.vue for displaying and managing cron jobs with search and filter capabilities.
- Created Module.ts to define the cron module for the application.
- Added ScheduleHelper.vue for assisting users in creating cron schedules with presets and custom options.
- Introduced a Pinia store (store.ts) for managing cron job state across the application.
- Updated ListTable.vue to include a new action for navigating to the cron management interface.
- Enhanced type definitions in app.d.ts to include CronJob interface and associated properties.
- Added cron module to the application type enumeration in type.ts.
- Improved error handling in Podman compose build form.
Copilot AI review requested due to automatic review settings May 14, 2026 23:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@xpf0000 xpf0000 merged commit c3e18c4 into xpf0000:master May 18, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants