diff --git a/app/file.py b/app/file.py index ee49999..042d86b 100644 --- a/app/file.py +++ b/app/file.py @@ -56,5 +56,5 @@ def setup(path, base_dir, file_prefix, etcd_url, etcd_password): # Write Crontab entry with open("/etc/crontabs/root", "a") as crontab: crontab.write( - f"*/5\t*\t*\t*\t*\tcd {os.path.join(os.getcwd(), repo_name)} && pipenv run python main.py" + f"*/1\t*\t*\t*\t*\t$(cd {os.path.join(os.getcwd(), repo_name)} && pipenv run python main.py)\n" ) diff --git a/app/image.py b/app/image.py index 7226436..b8c3ec8 100644 --- a/app/image.py +++ b/app/image.py @@ -54,5 +54,5 @@ def setup(path, base_dir, etcd_url, etcd_password): # Write Crontab entry with open("/etc/crontabs/root", "a") as crontab: crontab.write( - f"*/5\t*\t*\t*\t*\tcd {os.path.join(os.getcwd(), repo_name)} && pipenv run python main.py" + f"*/1\t*\t*\t*\t*\t$(cd {os.path.join(os.getcwd(), repo_name)} && pipenv run python main.py)\n" )