Create new cron file if does not exists for user

This commit is contained in:
jetchirag
2020-06-21 05:03:39 +05:30
committed by GitHub
parent 73a17998c1
commit d25c5ab6a6

View File

@@ -739,7 +739,7 @@ class cPanelImporter:
else:
localCronPath = "/var/spool/cron/crontabs/" + self.externalApp
localCronFile = open(localCronPath, "r+")
localCronFile = open(localCronPath, "a+")
commandT = 'touch %s' % (localCronPath)
ProcessUtilities.executioner(commandT, 'root')