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":
|
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
|
return jobs
|
||||||
|
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
|
|
@ -264,18 +269,28 @@ def get_cron_jobs():
|
||||||
|
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
|
||||||
if not line or line.startswith("#"):
|
if not line:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if "balance.py" in line:
|
if line.startswith("#"):
|
||||||
jobs["balance"] = " ".join(line.split()[:5])
|
continue
|
||||||
|
|
||||||
if "transactions.py" in line:
|
cron = " ".join(line.split()[:5])
|
||||||
jobs["transactions"] = " ".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)
|
print("CRONJOBS:", jobs)
|
||||||
|
|
||||||
return jobs
|
return jobs
|
||||||
def get_balance_comparison():
|
def get_balance_comparison():
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue