Difference between revisions of "Cron actions"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 110: Line 110:


<br><br>
<br><br>
[[Background Tasks|Background task]] for [[Invoices#Invoice_generation|Invoice generation]] will be created 2 days after each end of selected Invoice period. Repetition period determines when tasks have to be created.  
[[Background Tasks|Background task]] for [[Invoices#Invoice_generation|Invoice generation]] will be created 2 days after each end of selected Invoice period. Repetition period determines when tasks have to be created.<br>
This is done due to possible time zone differences to make sure that the billing period is over for a user.


For example, we want to generate Invoices every month for full month from 2015 October 1 until 2016 January 1.  
For example, we want to generate Invoices every month for full month from 2015 October 1 until 2016 January 1.  

Revision as of 14:50, 1 March 2024

Descriptions

Cron actions is MOR functionality which allows you to do some tasks at a specified time. Currently supported actions are these:

  • Change tariff (for Users and/or LCRs)
  • Change LCR (for Users)
  • Change provider tariff (for Providers)
  • Generate Invoice (for Users)
  • Send SOA (Statement of Account)



NOTE that currently only System Admin is allowed yo use this functionality.

Important notes on billing

MOR takes the call price before the call and uses it to calculate the final price after the call is finished.

Example: User starts a call at 9:58 PM and is talking for 5 minutes, you have an action which changes tariff at 10:00 PM. When call will be finished MOR will bill user using older tariff. If user starts a call after tariff change - he will be charged using the new tariff assigned for him.

Usage

Go to SETTINGS –> Setup –> Settings –> Cron actions:

Cron actions path.png

Here you will find list of all Cron Actions

Cron settings list.png

Click Icon add.pngAdd new Cron Action to create new Cron Action.

Example: Change tariff

Here is an example with an action Change tariff (applied for Users)

Cron actions settings.png

Name – enter here something that will help you to remember what this settings is about

Action – what to do. To change Tariff for User, choose Change tariff

For User – for which User/Users action has to be applied

Where current Tariff is – for All Users and Location Rules where selected Tariff/Tariffs assigned.

Change to Tariff – which tariff to set

Periodic type – how often to perform the task

Repeat forever – makes action never stop. NOTE: this setting does not work when the Periodic type is set to One Time.


From – when to start doing the action

Till – when to stop doing the action

Description – you can use this field for your notes

Example: Generate Invoices and send by Email

Here is an example with an action Generate Invoice (applied for Users)

Cron actions settings2.png

General

  • Name – enter here something that will help you to remember what this settings is about
  • Action – what to do. To generate Invoice for User, choose Generate Invoice

Details – Invoice Details

  • User – for which User/Users action has to be applied
  • Currency – currency which will be used for Invoice generation
  • From – day of the month which should be used as start of Invoice period
  • Till – day of the month which should be end of Invoice period
  • Send after Invoice is generated? – if email sending is enabled, you can choose to send Invoices after it is generated.

Repeat – Cron Action repetition

  • Periodic type – how often to perform the task: One Time, Monthly (Invoices are generated on 2nd day of a month), Bimonthly (every 2 months), Quarterly (every 3 months), Half-yearly (every 6 months), Dynamic.
  • Repeat forever – makes action never stop. NOTE: this setting does not work when the Periodic type is set to One Time.
  • From – when to start doing the action
  • Till – when to stop doing the action

Description – you can use this field for your notes

Every X days in Dynamic Periodic type

Everyxdays.png
For example, we choose parameter From date 2018-09-06 and parameter every 4 days.

System will start to generate the invoice at 2018-09-11 and invoice will be generated for period 2018-09-06 and 2018-09-09.

Next invoice generation will begin at 2018-09-15 and period for this invoice will be 2018-09-10 and 2018-09-13.



Background task for Invoice generation will be created 2 days after each end of selected Invoice period. Repetition period determines when tasks have to be created.
This is done due to possible time zone differences to make sure that the billing period is over for a user.

For example, we want to generate Invoices every month for full month from 2015 October 1 until 2016 January 1.

  • In Details section we select From - 1 and Till - 31
  • In Reapeat section we select Periodic type - monthly, From 2015 October 1 00 Till 2016 January 1 00
  • When Create button is pressed at 2015 October 2 we will find Invoices of September

NOTE If Repetition start date and time is over 48 hours after nearest end of selected Invoice period, first group of Incvoices will be generated more than after one month.



See also