Cron Jobs
کرون جابز
Cron Jobs
Cron jobs are automated scheduled tasks that run in the background at set intervals. RentOyee relies on cron jobs to send notifications, check document expiry dates, flag overdue bookings, and run maintenance tasks — all without any manual action.
Built-in Scheduled Tasks
- Daily Expiry Check — Scans all vehicle documents, customer CNICs, and driver licenses for upcoming expiry. Sends alerts at 30-day and 7-day thresholds. Runs every day at 8:00 AM.
- Overdue Booking Check — Identifies bookings where the vehicle has not been returned by the agreed date and sends alerts to managers. Runs every hour.
- Notification Dispatcher — Processes and sends the notification queue (SMS, email, push). Runs every 5 minutes.
- Session Cleanup — Removes expired and stale session records from the database. Runs nightly at midnight.
- AI Analytics Refresh — Recomputes business intelligence metrics for the Intelligence Dashboard. Runs daily at 2:00 AM.
- Cache Warmup — Pre-loads frequently accessed data into application cache. Runs every 30 minutes.
Setting Up the Cron Job on cPanel
Access your hosting control panel.
Navigate to Advanced → Cron Jobs in cPanel.
Set frequency to "Every Minute (* * * * *)" and enter:
/usr/local/bin/php /home/USERNAME/public_html/beta/artisan schedule:run >> /dev/null 2>&1
Replace USERNAME with your cPanel username and adjust the path to match your installation.
Click "Add New Cron Job". Laravel's scheduler now runs all tasks at their correct intervals automatically.
Go to Admin → Logs → System and filter by "scheduler". You should see "scheduler.ran" entries every minute. If absent, the cron is not correctly configured.
کرون جابز
کرون جابز خودکار شیڈول شدہ کام ہیں جو RentOyee مقررہ وقفوں پر پس منظر میں چلاتا ہے۔
بلٹ ان شیڈول شدہ کام
- روزانہ میعاد جانچ — گاڑیوں کے دستاویزات، CNIC، لائسنس میعاد چیک کرتا ہے
- زیر التواء بکنگ چیک — وقت سے زائد بکنگز کی اطلاع
- اطلاع ڈسپیچر — SMS اور ای میل قیو پروسیس کرتا ہے
- سیشن صفائی — میعاد ختم سیشن ریکارڈز ہٹاتا ہے
- AI تجزیات تازہ کاری — انٹیلیجنس ڈیش بورڈ ڈیٹا اپ ڈیٹ کرتا ہے
cPanel پر کرون جاب ترتیب دیں
فریکوئنسی "ہر منٹ" مقرر کریں اور کمانڈ درج کریں:
/usr/local/bin/php /home/USERNAME/public_html/beta/artisan schedule:run >> /dev/null 2>&1
Laravel شیڈولر اب تمام کام درست وقفوں پر چلائے گا۔