diff --git a/check_and_add_pull_git/main.py b/check_and_add_pull_git/main.py index 390c8a5..06f89bd 100644 --- a/check_and_add_pull_git/main.py +++ b/check_and_add_pull_git/main.py @@ -2,7 +2,7 @@ import os, shutil, sys -from crontab import CronTab +#from crontab import CronTab def search_str(file_path, word): with open(file_path, 'r') as file: @@ -37,16 +37,16 @@ try: except FileExistsError: print("File konnte nicht kopiert werden") -cron = CronTab(user=os.environ["USER"]) -basic_iter = cron.find_command(user_bin + os.sep + "pull_and_push >> " + my_logfile) -for item in basic_iter: - if str(item) == basic_command: - print("crontab job already exist", item) - is_exist=True - break +#cron = CronTab(user=os.environ["USER"]) +#basic_iter = cron.find_command(user_bin + os.sep + "pull_and_push >> " + my_logfile) +#for item in basic_iter: +# if str(item) == basic_command: +# print("crontab job already exist", item) +# is_exist=True +# break -if not is_exist: +#if not is_exist: #test - cron_job = cron.new(user_bin + os.sep + "pull_and_push >> " + my_logfile) - cron_job.every(10).hours() - cron.write() \ No newline at end of file +# cron_job = cron.new(user_bin + os.sep + "pull_and_push >> " + my_logfile) +# cron_job.every(10).hours() +# cron.write() \ No newline at end of file