Difference between revisions of "Cron actions"
m |
|||
(32 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
= | =Descriptions= | ||
Cron actions is MOR functionality which allows you to do some tasks at a specified time. Currently supported actions are these: | Cron actions is MOR functionality which allows you to do some tasks at a specified time. Currently supported actions are these: | ||
* Change tariff (for | * Change tariff (for Users and/or LCRs) | ||
* Change provider tariff (for | |||
* Change LCR (for Users) | |||
* Change provider tariff (for Providers) | |||
* <!---This functionality is available from MOR X5---> Generate Invoice (for Users) | |||
* Send SOA (Statement of Account) | |||
<br><br> | |||
'''NOTE''' that currently only System Admin is allowed yo use this functionality. | |||
<br><br> | <br><br> | ||
Line 16: | Line 20: | ||
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. | 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. | ||
<br><br> | |||
=Usage= | |||
Go to '''SETTINGS –> Setup –> Settings –> Cron actions''': | |||
<br><br> | <br><br> | ||
[[File:Cron_actions_path.png]] | [[File:Cron_actions_path.png]] | ||
<br><br> | <br><br> | ||
Here you will find list of all Cron Actions | |||
<br><br> | |||
[[File:Cron_settings_list.png]] | |||
<br><br> | |||
Click [[Image:icon_add.png]]'''Add new Cron Action''' to create new Cron Action. | |||
<br><br> | |||
==Example: Change tariff== | |||
''Here is an example with an action '''Change tariff''' (applied for Users)'' | |||
<br><br> | <br><br> | ||
[[File:Cron_actions_settings.png]] | [[File:Cron_actions_settings.png]] | ||
<br><br> | <br><br> | ||
'''Name''' | '''Name''' – enter here something that will help you to remember what this settings is about | ||
'''Action''' | '''Action''' – what to do. To change Tariff for User, choose '''Change tariff''' | ||
'''User''' | '''For User''' – for which User/Users action has to be applied | ||
'''Tariff''' | '''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 | |||
<br><br> | |||
==Example: Generate Invoices and send by Email == | |||
<!---Functionality will be available only from MOR x6---> | |||
''Here is an example with an action '''Generate Invoice''' (applied for Users)'' | |||
<br><br> | |||
[[File:Cron_actions_settings2.png]] | |||
<br><br> | <br><br> | ||
[[File: | |||
'''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 based on the specified '''From''' and '''Till''' dates, with a minimum start time of 6:00 AM if the '''Repeat From''' date is the day after the '''Till''' date), 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 | |||
<br><br> | |||
==Every X days in Dynamic Periodic type== | |||
[[File:Everyxdays.png]] | |||
<br> | |||
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. | |||
<br><br> | |||
[[Background Tasks|Background task]] for [[Invoices#Invoice_generation|Invoice generation]] will be created based on the specified '''From''' and '''Till''' dates, with a minimum start time of 6:00 AM if the '''Repeat From''' date is the day after the '''Till''' date.<br>The repetition period determines when tasks have to be created. This is done to account for possible time zone differences and to ensure that the billing period is over for a user. This applies to the Invoices action only. | |||
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 1 06 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. | |||
<br><br> | <br><br> | ||
=See also= | |||
* [[Users]] | |||
* [[LCR]] | |||
* [[Providers]] | |||
* [[Tariffs]] | |||
* [[Invoices]] |
Latest revision as of 15:20, 2 July 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:
Here you will find list of all Cron Actions
Click Add new Cron Action to create new Cron Action.
Example: Change tariff
Here is an example with an action Change tariff (applied for Users)
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)
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 based on the specified From and Till dates, with a minimum start time of 6:00 AM if the Repeat From date is the day after the Till date), 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
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 based on the specified From and Till dates, with a minimum start time of 6:00 AM if the Repeat From date is the day after the Till date.
The repetition period determines when tasks have to be created. This is done to account for possible time zone differences and to ensure that the billing period is over for a user. This applies to the Invoices action only.
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 1 06 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.