Extending Firefly-iii with cron jobs in Docker #6754
dimaj
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
Wow, this is amazing work! Very cool! 😁 That's going into the docs for sure. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Firefly is an amazing piece of software and I am totally addicted to it. As of right now, the only inconvenience that I have is that I cannot auto-import my transactions as they take place (or soon after).
So, my solution to this was the following:
$0.01
Without further ado, here are the pieces to make above work:
Google script
When you create your google script, make sure to add 2 project properties:
firefly-pat
- Personal Access Token to authenticate against Fireflyfirefly-endpoint
- Endpoint of you Firefly instance.Cron jobs
Based on the documentation, one of the suggested ways that tasks could be kicked off periodically was to create a new docker container that would be on the same network as Firefly container and would execute shell scripts using container's cron process.
Given that I want to backup my cron scripts, I created an NFS volume that points to a shared folder on my NAS with the following folder structure:
Volume could be created in the following manner:
From there, I can start my container like so:
(image
dimaj/alpine:tools
is essentially an alpine image withjq
,curl
andbash
:)
Now, anytime you want to execute a task on regular basis, you can simply add a shell script (with executable bit set) to any of the folders on your NAS and have these scripts get executed automatically.
Your imagination is your limiter as to what you can do there. As of right now, I have 2 scripts:
Process-Rules
- Runs all rule groups every 15 minutes so that my destination accounts would be properly renamed. I am using this to build out my rules library that would rename destination accounts.delete-accounts
- As destination accounts get renamed fromMERCHANT NAME STORE NUMBER 786
toMerchant Name
, this script is going to clean up obsolete expense accounts that have their value set to 0.Hope this is useful!
Beta Was this translation helpful? Give feedback.
All reactions