Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
a4ecb0e8a0
|
|||
27b2aea827
|
1
crontab
1
crontab
@ -3,3 +3,4 @@ CONTENT_TYPE = "text/html"
|
|||||||
|
|
||||||
0 13 1 * * user /opt/app/monatliche-forderung-eintragen.py
|
0 13 1 * * user /opt/app/monatliche-forderung-eintragen.py
|
||||||
0 4 * * * user /opt/app/monatliche-forderung-ueberwachen.py
|
0 4 * * * user /opt/app/monatliche-forderung-ueberwachen.py
|
||||||
|
|
||||||
|
@ -3,12 +3,12 @@
|
|||||||
import requests
|
import requests
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
class ResourceNotFoundException(Exception): pass
|
class ServerException(Exception): pass
|
||||||
|
|
||||||
def postJson(url):
|
def postJson(url):
|
||||||
resp = requests.post(url)
|
resp = requests.post(url)
|
||||||
if resp.status_code != 202:
|
if resp.status_code != 202:
|
||||||
raise ResourceNotFoundException("URL: {}, Code: {}".format(url, resp.status_code))
|
raise ServerException("URL: {}, Code: {}, Msg: {}".format(url, resp.status_code, resp.text))
|
||||||
return resp.json()
|
return resp.json()
|
||||||
|
|
||||||
|
|
||||||
@ -23,3 +23,5 @@ try:
|
|||||||
print("Monatliche Mietforderungen erfolgreich eintragen")
|
print("Monatliche Mietforderungen erfolgreich eintragen")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("ERROR: {}".format(e))
|
print("ERROR: {}".format(e))
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user