add sync-banks script
This commit is contained in:
@@ -6,8 +6,9 @@ This is a collection of useful scripts to help you manage your Actual Budget.
|
||||
- [Configuration](#configuration)
|
||||
- [Installation](#installation)
|
||||
- Scripts:
|
||||
- [Loan Interest Calculator](#loan-interest-calculator)
|
||||
- [Tracking Home Prices (Zillow's Zestimate)](#tracking-home-prices-zillows-zestimate)
|
||||
- [Sync Remote Banks](#sync-remote-banks)
|
||||
- [Loan Interest Calculator](#loan-interest-calculator)
|
||||
- [Tracking Home Prices (Zillow's Zestimate)](#tracking-home-prices-zillows-zestimate)
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -46,6 +47,21 @@ Note that most of the scripts utilize account notes to set configuration on
|
||||
each account. The scripts will find all accounts that are configured and
|
||||
update them all in a single call.
|
||||
|
||||
### Sync Remote Banks
|
||||
|
||||
This script will sync all remote banks that are configured in Actual Budget.
|
||||
This can be used in place of clicking the "Sync" button in the Actual Budget
|
||||
app and will ensure your accounts are always up-to-date with
|
||||
GoCardless/SimpleFIN.
|
||||
|
||||
To run:
|
||||
|
||||
```console
|
||||
$ node sync-banks.js
|
||||
```
|
||||
|
||||
It is recommended to run this script once per day or week.
|
||||
|
||||
### Loan Interest Calculator
|
||||
|
||||
This script calculates the interest for a loan account and adds the interest
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Script to run all bank syncs
|
||||
// Useful for running bank syncs on a daily/weekly schedule
|
||||
const { closeBudget, openBudget } = require('./utils');
|
||||
const api = require('@actual-app/api');
|
||||
|
||||
(async () => {
|
||||
await openBudget();
|
||||
|
||||
console.log("syncing banks...");
|
||||
await api.runBankSync();
|
||||
|
||||
await closeBudget();
|
||||
})();
|
||||
Reference in New Issue
Block a user