-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
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
- Set up email sync in Krayin CRM
- Send a new email to the configured email address
- Wait for up to 5 minutes to see it reflected in the CRM inbox
- 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