use a sorted PATH to avoid re-runs
This commit is contained in:
parent
467d4fac4b
commit
302240df65
|
@ -1,5 +1,5 @@
|
||||||
# {{@@ header() @@}}
|
# {{@@ header() @@}}
|
||||||
PATH={{@@ env["PATH"] @@}}
|
PATH={{@@ ordered_path() @@}}
|
||||||
|
|
||||||
#minute hour day month day_week cmd
|
#minute hour day month day_week cmd
|
||||||
*/5 * * * * forecast json
|
*/5 * * * * forecast json
|
||||||
|
|
11
funcs.py
11
funcs.py
|
@ -3,3 +3,14 @@ import os
|
||||||
|
|
||||||
def parent_dir(path):
|
def parent_dir(path):
|
||||||
return os.path.split(path)[0]
|
return os.path.split(path)[0]
|
||||||
|
|
||||||
|
|
||||||
|
def ordered_path():
|
||||||
|
PATH = os.environ['PATH']
|
||||||
|
|
||||||
|
newPATH = []
|
||||||
|
for i in PATH.split(":"):
|
||||||
|
if i not in newPATH:
|
||||||
|
newPATH.append(i)
|
||||||
|
|
||||||
|
return ':'.join(newPATH)
|
||||||
|
|
Reference in New Issue