From fd1f54c1e118f11dbe7b8aee450e2791b5b65ed1 Mon Sep 17 00:00:00 2001
From: Ahmed Bilal Khalid <ahmedbilal96@gmail.com>
Date: Sat, 31 Aug 2019 00:34:10 +0500
Subject: [PATCH] a

---
 app/file.py  | 2 +-
 app/image.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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"
         )