This scheduled tasks based on linux crontab.
Here is crontab example for all of the operations in native installation:
# BillRun crontab
BILLRUN_DIR=/var/www/billrun
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# Receiving
### Receiving All
* * * * * www-data flock -n /tmp/billrun_all_recieve php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --environment prod --receive --type all
# Processing
### Processing All
* * * * * www-data flock -n /tmp/billrun_all_process php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --environment prod --process --type all
#Rating
### Customer
* * * * * www-data flock -n /tmp/billrun_rate_customer php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --environment prod --calc --type customer
### Rate association
* * * * * www-data flock -n /tmp/billrun_rate_usage php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --environment prod --calc --type Rate_Usage
### Customer pricing
* * * * * www-data flock -n /tmp/billrun_rate_pricing php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --environment prod --calc --type customerPricing
### Tax
* * * * * www-data flock -n /tmp/billrun_rate_tax php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --environment prod --calc --type tax
# Rebalance
* * * * * www-data flock -n /tmp/billrun_rebalance_lock php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --environment prod --calc --type rebalance
# Collection
0 1-23/2 * * * www-data flock -n /tmp/billrun_run_collect.lock php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --env prod --collect
30 0-22/2 * * * www-data flock -n /tmp/billrun_run_collect.lock php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --env prod --run_collect_step
# Events
* * * * * www-data flock -n /tmp/billrun_trigger_events.lock php -t $BILLRUN_DIR $BILLRUN_DIR/public/index.php --env prod --notify --type events
If you installed BillRun application under docker, here is the same crontab, but with docker exec command:
# BillRun crontab
BILLRUN_DIR=/var/www/billrun
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# Receiving
### Receiving All
* * * * * root flock -n /tmp/billrun_all_recieve docker exec -it -w /billrun billrun-app php public/index.php --env=container --receive --type all
# Processing
### Processing All
* * * * * root flock -n /tmp/billrun_all+process docker exec -it -w /billrun billrun-app php public/index.php --env=container --process --type all
# Rating
### Customer
* * * * * www-data flock -n /tmp/billrun_rate_customer docker exec -it -w /billrun billrun-app php public/index.php --env=container --calc --type customer
### Rate association
* * * * * www-data flock -n /tmp/billrun_rate_usage docker exec -it -w /billrun billrun-app php public/index.php --env=container --calc --type Rate_Usage
### Customer pricing
* * * * * www-data flock -n /tmp/billrun_rate_pricing docker exec -it -w /billrun billrun-app php public/index.php --env=container --calc --type customerPricing
### Tax
* * * * * www-data flock -n /tmp/billrun_rate_tax docker exec -it -w /billrun billrun-app php public/index.php --env=container --calc --type tax
# Rebalance
* * * * * www-data flock -n /tmp/billrun_rebalance_lock docker exec -it -w /billrun billrun-app php public/index.php --env=container --calc --type rebalance
# Collection
0 1-23/2 * * * www-data flock -n /tmp/billrun_run_collect.lock docker exec -it -w /billrun billrun-app php public/index.php --env container --collect
30 0-22/2 * * * www-data flock -n /tmp/billrun_run_collect.lock docker exec -it -w /billrun billrun-app php public/index.php --env container --run_collect_step
# Events
* * * * * www-data flock -n /tmp/billrun_trigger_events.lock docker exec -it -w /billrun billrun-app php public/index.php --env container --notify --type events