Skip to main content

Cron and maintenance

Overview​

EasyQuote 1.7.5 has five cron jobs in the default group (etc/crontab.xml) and one bin/magento command, easyquote:attachments:migrate. The job list for store owners is on Cron jobs: see the notification job the temporary quote cleanup job and the attachment cleanup job. This page covers what the jobs do in code and what breaks when cron stops.

Job Class and method Schedule
mageme_easyquote_notification MageMe\EasyQuote\Cron\Notification::send * * * * *
mageme_easyquote_temp_quote_cleanup MageMe\EasyQuote\Cron\TempQuoteCleanup::execute * * * * *
mageme_easyquote_request_file_tmp_cleanup MageMe\EasyQuote\Cron\RequestFileTmpCleanup::execute 17 * * * *
mageme_easyquote_legacy_quote_pdf_cleanup MageMe\EasyQuote\Cron\LegacyQuotePdfCleanup::execute 31 * * * *
mageme_easyquote_attachment_storage_migration MageMe\EasyQuote\Cron\AttachmentStorageMigration::execute 43 * * * *

What the notification job does​

The job returns at once when EasyQuote is disabled in every store view. Otherwise it runs four passes, in this order:

Pass Picks Does
Requests Requests created in the last 7 days that still miss the admin or the customer email Sends the admin email with the request attachments, then the customer confirmation, and sets is_admin_notified / is_customer_notified
Quote expiry Approved quotes whose expiry or reminder date has passed Sends the expiration reminder once (is_reminder_sent), then sets Expired and sends the expired email
Proposal expiry Awaiting Customer Review quotes whose proposal expiry or proposal reminder date has passed Sends the proposal reminder once, then sets Proposal Expired and sends that email
Follow-up Approved and Awaiting Customer Review quotes whose follow-up date has passed Sends the follow-up email once (is_follow_up_sent)

The quote passes check Enable Customer Notification and Notification Type per store view and skip internal quotes. The request pass reads Enable Admin Notification, the admin Email Address, Enable Customer Notification and Notification Type for the store view of each request. When an email is turned off there, or the customer has no email address, the request is flagged as notified for it at once, so it is never sent later. A failed request, reminder or follow-up email is written to the log and retried on the next run. A failed Expired or Proposal Expired email is logged but not retried: the quote has already changed status, and the pass only picks quotes in the earlier status.

Editor cart cleanup​

The quote editor in the admin builds the quote in a Magento cart flagged is_mm_eq = 1. The cleanup job deletes these carts through CartRepositoryInterface once their created_at is before the start of yesterday. In practice an editor cart lives between one and two days. The period is the class constant PURGE_PERIOD = 1, with no setting. Customer carts are never touched.

An editor tab left open for more than a day may lose its working cart. Saved quotes are not affected: they live in mm_easyquote_quote, not in carts.

Attachment cleanup​

A file attached to a request message is uploaded to mm_easyquote_request_message_file_tmp before the message is sent, from the storefront request form and from the admin reply form. The cleanup job deletes the temporary rows older than one hour, once an hour at minute 17, through RequestMessageFileTmpRepositoryInterface::cleanup(). Files of sent messages live in their own table and are not touched. A failure is logged and the next run tries again.

Attachment storage​

From 1.7.5 on, request attachments live outside the web root, in var/mageme/easyquote by default. To use another folder, for example one shared by several web servers, set an absolute path, or a path relative to the Magento root, in app/etc/env.php:

'mageme' => ['easyquote' => ['attachment_storage_path' => '/mnt/shared/easyquote']],

Files are served only through the admin download controller, with the MageMe_EasyQuote::request_view resource, and only when the file belongs to an existing message of an existing request. Deleting a request deletes its files after the transaction commits. Keep the folder in your backups and out of anything your deployment cleans or replaces. If it isn't writable, an upload fails with "The attachment could not be saved." and the reason, with the path, goes to the log as critical.

bin/magento easyquote:attachments:migrate moves the files that versions before 1.7.5 kept in pub/media/eq: each file is copied, checked by size and SHA-1, then removed from the old place. A file without a database row goes to quarantine/ inside the storage. Old thumbnails are deleted. The command prints the counts and exits with code 1 when a file couldn't be moved; that file stays in place and the next run tries it again. --cleanup also sets aside files of the storage that have no row and are older than one hour. While files remain in pub/media/eq, the admin shows a system message.

The mageme_easyquote_attachment_storage_migration job doesn't move old files. It sets aside files of the storage without a row, older than one hour, and deletes quarantined files after 7 days. The storage holds a marker per installation in .instances/. When it finds another installation's marker, the job, the cleanup and the command stop and log a critical message, so a folder shared by mistake with a staging copy keeps the other installation's files.

Old PDF cleanup​

From 1.7.5 on, Print Quote and Export To PDF write the file to var/tmp under a random name and delete it after the download. The mageme_easyquote_legacy_quote_pdf_cleanup job, and a data patch at setup:upgrade, delete quote_*.pdf and eq_pdf_*.pdf files in var/tmp older than one hour. Only regular files are deleted, not symbolic links.

Keep cron healthy​

When cron stops Effect
For minutes or hours No request emails, reminders, expiry changes or follow-ups. They all go out on the next run.
For more than 7 days Requests older than 7 days are never emailed, because the request pass only looks at the last 7 days. The requests themselves are kept and show in the Requests grid.
For days Quotes stay Approved or Awaiting Customer Review after their date has passed, until cron runs again. Editor carts pile up in quote.

Checks:

  1. Run bin/magento cron:run from the system crontab every minute, as Magento requires.
  2. Look for the five jobs in the cron_schedule table: SELECT job_code, status, executed_at, messages FROM cron_schedule WHERE job_code LIKE 'mageme_easyquote%' ORDER BY scheduled_at DESC LIMIT 20;
  3. Read failures in var/log/system.log and var/log/exception.log. The notification job logs email failures with level critical.

What's next​

Applies to EasyQuote 1Last reviewed November 28, 2026