Skip to content

Add Manual "Fetch Latest Email" Button in Krayin CRM to Avoid Unnecessary Scheduled Command Execution #2268

@sagarkumar-webkul

Description

@sagarkumar-webkul

Enhancement Request

Title

Add Manual "Fetch Latest Email" Button in Krayin CRM to Avoid Unnecessary Scheduled Command Execution

Description

Currently, Krayin CRM requires the php artisan inbound-emails:process command to run every 5 minutes on the server to fetch the latest emails. This results in the following drawbacks:

  • Users have to wait for up to 5 minutes before their inbox is updated.
  • The command runs every 5 minutes even if the user doesn’t intend to fetch new emails, leading to unnecessary server load.

To enhance user control and system efficiency, the suggested improvement is:

  • Introduce a "Fetch Latest Email" button in the Email section of the UI.
  • When a user clicks the button, only then the inbound-emails:process command should be triggered.
  • This makes the fetching process on-demand and reduces background job frequency, aligning better with user intent and performance optimization.

Preconditions

  • Krayin CRM installed and configured with IMAP email sync
  • Email fetching command (php artisan inbound-emails:process) is currently scheduled to run every 5 minutes via a cron job

Steps to Reproduce

  1. Set up email sync in Krayin CRM
  2. Send a new email to the configured email address
  3. Wait for up to 5 minutes to see it reflected in the CRM inbox
  4. Observe that the fetch command runs every 5 minutes regardless of user action

Actual Result

  • Emails are fetched only when the scheduled cron runs (every 5 minutes)
  • Server load increases due to repetitive execution of fetch command
  • No real-time update unless the user waits

Expected Enhancement

  • Add a "Fetch Now" button in the UI under the Email section
  • On button click, trigger the email fetch command instantly
  • Stop unnecessary scheduled execution unless explicitly required

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions