CronEDIT
This commit is contained in:
parent
e9ad3ed655
commit
0ba9f8fd86
1 changed files with 22 additions and 7 deletions
29
app.py
29
app.py
|
|
@ -252,6 +252,11 @@ def get_cron_jobs():
|
|||
}
|
||||
|
||||
if platform.system() != "Linux":
|
||||
|
||||
jobs["balance"] = "nur unter Linux verfügbar"
|
||||
jobs["transactions"] = "nur unter Linux verfügbar"
|
||||
jobs["categorize"] = "nur unter Linux verfügbar"
|
||||
|
||||
return jobs
|
||||
|
||||
result = subprocess.run(
|
||||
|
|
@ -264,18 +269,28 @@ def get_cron_jobs():
|
|||
|
||||
line = line.strip()
|
||||
|
||||
if not line or line.startswith("#"):
|
||||
if not line:
|
||||
continue
|
||||
|
||||
if "balance.py" in line:
|
||||
jobs["balance"] = " ".join(line.split()[:5])
|
||||
if line.startswith("#"):
|
||||
continue
|
||||
|
||||
if "transactions.py" in line:
|
||||
jobs["transactions"] = " ".join(line.split()[:5])
|
||||
cron = " ".join(line.split()[:5])
|
||||
|
||||
if line.endswith("categorize_transactions.py"):
|
||||
|
||||
jobs["categorize"] = cron
|
||||
|
||||
elif line.endswith("transactions.py"):
|
||||
|
||||
jobs["transactions"] = cron
|
||||
|
||||
elif line.endswith("balance.py"):
|
||||
|
||||
jobs["balance"] = cron
|
||||
|
||||
if "categorize_transactions.py" in line:
|
||||
jobs["categorize"] = " ".join(line.split()[:5])
|
||||
print("CRONJOBS:", jobs)
|
||||
|
||||
return jobs
|
||||
def get_balance_comparison():
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue