diff --git a/check_and_add_pull_git/main.py b/check_and_add_pull_git/main.py index 17bf930..390c8a5 100644 --- a/check_and_add_pull_git/main.py +++ b/check_and_add_pull_git/main.py @@ -18,7 +18,7 @@ def search_str(file_path, word): user_bin = os.environ["HOME"] + os.sep + "bin" user_zshrc = os.environ["HOME"] + "/.zshrc" my_logfile = os.sep + "var" + os.sep + "log" + os.sep + "pull_and_push.log" -basic_command = "* */17 * * * " + user_bin + os.sep + "pull_and_push >> " + my_logfile +basic_command = "0 */10 * * * " + user_bin + os.sep + "pull_and_push >> " + my_logfile print(basic_command) is_exist = False @@ -48,5 +48,5 @@ for item in basic_iter: if not is_exist: #test cron_job = cron.new(user_bin + os.sep + "pull_and_push >> " + my_logfile) - cron_job.hour.every(17) + cron_job.every(10).hours() cron.write() \ No newline at end of file diff --git a/check_and_add_pull_git/pull_and_push.py b/check_and_add_pull_git/pull_and_push.py index 7c91305..7ee4adc 100644 --- a/check_and_add_pull_git/pull_and_push.py +++ b/check_and_add_pull_git/pull_and_push.py @@ -40,6 +40,8 @@ class my_git(): my_git.git_push(self, git_folder=git_folder_s) if __name__ == "__main__": + check_time= datetime.datetime.now() + print(check_time.strftime("%H-%M")) print(str(datetime.datetime.now()) + " start...") check_my_git = my_git(check_folder= os.sep + "home" + os.sep + os.environ["USER"] + os.sep + "Projekte") check_my_git.git_main()