InstaHaul
  • Introduction
  • Usage Flows (FlowCharts)
  • Firebase
    • Firebase
    • Firebase firestore database
    • Firebase Security
    • Firebase Storage
    • Firestore indexes
    • Chat & Live tracking
  • Backend
    • Prerequisite
    • VPS/Shared Hosting
    • Installation
    • Composer & Node Packages
    • Database Configuration
    • GUI Installer
    • Timezone
    • Firebase
    • Web Notification
    • Firebase Forgot password
    • Change Backend Color
    • Reskin Mobile App
    • Terminal
      • Commands
    • Screenshots
    • Order schedule
    • CRON job
    • Clear Data (Users/Orders etc)
    • Email Server Settings
    • SMS Gateway
    • Payment Gateways
    • Webhooks - Payment gateway
    • Language / Translation
    • HOW TO UPDATE
    • In-App Live chat/support
    • Geocoding and Place search
    • Features
      • Firebase/Notification Delay
      • Fleet Management
      • Loyalty points
      • Home Screen Design
      • Featured Vendors
      • Trip recalculation/Outstanding payments
      • Switch between Taxi/Regular Driver
      • Data Translation - Backend
  • Flutter App
    • Getting Started
    • Steps
    • Directory Structure
    • Change App Name & ID
    • Change App icon & splash
    • App Color / Theme
    • Connect To Backend
    • Firebase
    • Firebase Auth - Phone
    • Firebase Phone OTP - Android
    • Firebase Phone OTP - iOS
    • Firebase Notification iOS
    • Share link - Firebase dynamic link
    • Social Media Login
      • Google login
      • Facebook Login
      • Sign-In with Apple
    • Google Map
    • Change App Language
    • Notification Sound
    • Custom Translation
    • Change App Font
    • Running on VS Code
    • Running on Android Studio
    • Generate Android Release App
    • Upload to Apple App Store
    • Screenshots
  • Demo Accounts
  • FAQs
    • Backend Image not working
    • Backend Backup not working
    • Upgrade without losing data
    • Backend Rollback
    • Blank Home screen
    • Custom Token
    • Product price zero(0) in details
    • Auto-cancel Not working
    • Pharmacy vendor
    • Vendor default rating
    • App logins
    • Error ==> type 'String' is not a subtype of type 'int'
    • NDK version error
    • Push Notification
    • Delivery Zone Map error
    • HOW TO UPDATE ADMINEND
    • Driver app rejected by Google
    • Cron job error
    • Auth pages Not working - App
  • HOW-TO
    • Onboarding Settings
    • Earning
      • Drivers
    • Enforce CASH Payment For Delivery Fee Only
    • System Contact Email
    • Driver Matching Flow
  • Extensions
    • Driver tracking extensions
    • Paymongo Gateway
    • Mercadopago Gateway
    • Nagad [Bangladeshi]
    • Instamojo - Payment
    • Paytrail
    • Paymaya Gateway
    • Emailer
    • External Notifier
      • Slack Setup
      • Telegram Setup
  • Upgrades
    • How to update
    • Important: Backend VPS/Shared hosting
    • 1.0.1
    • 1.1.00
    • Change logs
Powered by GitBook
On this page
  • QUEUED JOBS
  • SETUP REMOTE CRON JOB
  • How to get your cron job url
  1. Backend

CRON job

PreviousOrder scheduleNextClear Data (Users/Orders etc)

Last updated 1 year ago

Login to your cpanel and find Cron jobs.

Select the Cron jobs. Then you will be shown a page to enter your cron job details.

Select every one minute from the common settings option. Then the following code in the command input filed.

php /PATH_TO_YOUR_PROJECT/artisan schedule:run >> /dev/null 2>&1

Please replace PATH_TO_YOUR_PROJECT, with path to your project on the your server.

QUEUED JOBS

You need to also set a queue work command on your cron job.

Using the step stated above, Select every two minutes from the common settings option. Then use the following code in the command input filed.

php /PATH_TO_YOUR_PROJECT/artisan queue:work --max-time=120

Please replace PATH_TO_YOUR_PROJECT, with path to your project on the your server.

Then Add new cron job, to save the job.

SETUP REMOTE CRON JOB

How to get your cron job url

Here is a link to the official documentation from cpanel on how to setup Cron job.

Its very likely that if you are using a shared hosting to setup your cron job, you might be limit to only 5mintues, which means that it will take at least 5mins before orders are pushed out to the drivers. For this reason we provided a url that can be use to trigger the cron job remotely using external systems like .

https://blog.cpanel.com/how-to-configure-a-cron-job/
https://cron-job.org/en/