miniCal
  • Quick Start
    • Introduction
  • miniCal Configuration
    • miniCal Hosted Service
    • Configure Feature Settings
    • Install Extensions
    • Create Multiple Properties
  • Local Installation
    • Local Installation
    • ENV Set-Up
    • Configuration Settings
    • Common Installations Errors
  • Contribution
    • Contribute to miniCal Core
  • Build an Extension
    • Build Your First Extension
      • Controllers
      • Assets
      • Config
      • language
      • Models
      • View
      • Helper
      • Library
      • Hooks
    • Open-source Extensions
    • Config Folder Files
      • Autoload File
      • Config File
      • Route File
    • miniCal Filters
    • miniCal Actions
    • Create Custom Hooks
    • Store Custom Data
      • POSTS
      • POSTMETA
      • OPTIONS
    • Composer Dependencies
  • Marketplace
    • miniCal Marketplace
  • Other resources
    • Overbooking for OTAs
    • miniCal Cron Setup
    • Automated Night Audit
    • Nginx Configuration
    • Docker Installation
    • Custom Domain Setup
  • Minical API Docs
    • API Documentation
  • Coming soon!
    • Access minical Data Using Helpers
      • Company Helper Functions
      • Customer Helper Functions
      • Booking Helper Functions
      • Rates Helper Functions
      • Rate Plan Helper Functions
      • Availability Helper Functions
      • Statement Helper Functions
      • Tax Helper Functions
      • Room Helper Functions
      • Charge Helper Functions
      • Payment Helper Functions
    • Access data in Extension
Powered by GitBook
On this page
  • Automatic Night Audit
  • How to add the cron job
  • How to run cron for night audit
  • 0 * * * * wget path/cron/hourly > /dev/null 2>&1
  1. Other resources

Automated Night Audit

PreviousminiCal Cron SetupNextNginx Configuration

Last updated 3 years ago

When you set up miniCal, it will mark the current date as the date you register on the miniCal. In other words, if you set up miniCal and get registered on 12th Jan 2022 so in the booking calendar, the current date (selling date) will be 12th Jan 2022 forever. It will not change the current date (selling date) every day.

So for this miniCal has provided "Manual Night Audit" or "Automatic Night Audit"

In the above screenshot, you will find various options so let's have a look one by one.

  1. Automatically Change Date To The Next Day After:- This will run a cron at your given time every day. You can change the time in the dropdown.

  2. Apply Night Audit Charges To Checked-in Bookings Regardless Of Their Check-out Date:- This checkbox determines that the same charges will be applied for a booking as the day booking is created.

  3. Apply Night Audit Charges To Checked-in Bookings Only (Not Reservations):- This will apply the charges on the booking that already checked-in.

How to add the cron job

Syntax of crontab

The syntax is:

1 2 3 4 5 /path/to/command arg1 arg2

Where,

  • 1: Minute (0-59)

  • 2: Hours (0-23)

  • 3: Day (0-31)

  • 4: Month (0-12 [12 == December])

  • 5: Day of the week(0-7 [7 or 0 == sunday])

  • /path/to/command – Script or command name to schedule

How to run cron for night audit

To run cron for night audit you need to run this command

0 * * * * wget path/cron/hourly > /dev/null 2>&1

As you see in the above command there are many things so let's check what is what

  • 0:- Run at 0th minute (this cron will run at the 0th minute of an hour)

  • *:- This operator specifies all possible values for a field.

  • wget:- Wget is the non-interactive network downloader is used to download files from the server.

  • path/cron/hourly:- This is the domain path you have set for miniCal for example, "http://localhost/minical/public/cron/hourly" or "http://customdomin/cron/hourly".

  • /dev/nul l 2>&1:- To stop default output from crontab you need to append >/dev/null 2>&1.

For this particular scenario, miniCal has provided an excellent extension for night audits. Check the extension at miniCal Marketplace. This extension will run a cron every day so that the current date on the calendar will change automatically, and you can manage everyday charges with this. If you use the extension, then For miniCal hosted service this cron will run automatically. But for miniCal local (hosted on your local server), you need to set up cron.

Automatic Night Audit
Automatic Night Audit
Automatic Night Audit