We build software, dev stacks & apps — and we still offer hosting.
hTech

AI Delay & Queue System (Cron + Delayed Replies) in the hTech AI Ticket Assistan Print

  • 0

Overview

The hTech AI Ticket Assistant includes a Delay & Queue System that allows the AI to wait before replying to customers. This creates more natural, human-like response timing and avoids replies that appear instant or automated. The system uses a processing queue and a cron job to schedule and deliver delayed responses.


What Is the AI Delay Feature?

The AI Delay feature lets you control how long the assistant waits before sending its reply. When enabled, the AI will:

  • Analyze the ticket immediately
  • Generate the reply
  • Store the reply in the queue
  • Deliver the reply only after the configured delay time

This makes automation appear more natural and reduces the risk of customers noticing automated patterns.


Where to Enable AI Delay

You can enable this feature inside the module settings:

  • Go to WHMCS admin
  • Select Addons
  • Click "hTech AI Ticket Assistant"
  • Open the Settings tab

Look for the option labeled "Enable Reply Delay".


Reply Delay Time

When the delay feature is enabled, you can specify how long the AI should wait before sending replies.

Typical delay times:

  • 3 minutes – Subtle, natural delay
  • 5 minutes – Ideal balance of speed and realism
  • 10 minutes or more – Best for departments where automation must feel human

The reply is not delivered until the delay time has passed.


How the Queue System Works

When a ticket requires a delayed reply, the system stores the AI-generated response in a queue. Each queued entry includes:

  • Ticket ID
  • Department ID
  • The generated AI reply
  • The time the reply should be delivered
  • The status (queued, processing, complete)

Nothing is sent to the customer until the queue processor releases the reply.


Why a Queue System Is Used

The queue system is designed to:

  • Prevent duplicates by locking entries during processing
  • Ensure replies are delivered exactly on time
  • Retry failed sends if WHMCS is temporarily busy
  • Work safely under heavy ticket volume

Even if multiple messages come in at once, the queue processes them in a controlled order.


Cron Job Requirement

For delayed replies to work, you must configure the queue cron job on your server. This cron job runs the queue processor, checks for any replies that are ready to be sent, and posts them to tickets.

Example cron job:

*/5 * * * * php -q /home/USERNAME/public_html/modules/addons/htech_ai_ticket_assistant/cron/queue.php

Replace USERNAME with your hosting account or system user.

Running the cron every 5 minutes is recommended. You may run it as often as once per minute for near-real-time processing.


What Happens When Cron Runs

Each time the cron executes, the system:

  • Scans the queue for pending replies
  • Checks if the delay time has passed
  • Posts the reply to the ticket if ready
  • Marks the queue entry as completed
  • Logs the action in the AI log

If a reply has an error (such as a missing ticket), it is logged but does not break the queue.


Manual Queue Management

Inside the module, admins can:

  • View pending delayed replies
  • See the scheduled delivery time
  • Check last error messages
  • Manually clear entries if needed

This gives full control over delayed automation.


When to Use the Delay Feature

Delayed replies are useful when you want automation but still want it to feel human. Recommended use cases:

  • Sales inquiries
  • General support
  • Onboarding departments
  • Any department where instant replies look suspicious

Not recommended for emergency or outage support where immediate replies are expected.


Common Issues and Fixes

  • No replies are sent: Check that the cron job is running.
  • Replies delayed too long: Cron interval may be too large.
  • Duplicate replies: Ensure only one cron job is configured.
  • Replies never appear: Verify that the ticket department allows Auto Reply or Suggest mode.

Summary

The AI Delay and Queue System provides controlled, human-like timing for automated responses. By combining queuing with scheduled cron processing, the hTech AI Ticket Assistant ensures delayed messages are accurate, safe, and delivered exactly when intended.

If you need help with cron setup or queue troubleshooting, feel free to open a support ticket.


Was this answer helpful?

Related Articles

« Back