Crontab not executing after code-signing in Mac

48 Views Asked by At

I create cronJob in my mac application using apple script. It was working fine until codeSigning the application.

I had to code sign the application to keep away from gateKeepers. Each time i update the cron there was a gatekeeper popup. To remove gateKeepers i had to codeSign my application.

I used Developer ID Application certificate to codesign the application.

 NSDictionary *error1 = [NSDictionary new];
                        NSString *script1 =  @"tell application \"Terminal\" to do script \" crontab -l > mycron ; echo '* * * * * cd /Applications/PPFolder && ./CronCheck.sh >> /Applications/PPFolder/scriptlogs.log' >> mycron ; crontab mycron ; rm mycron ; exit;\" ";
                        NSAppleScript *appleScript1 = [[NSAppleScript alloc] initWithSource:script1];
                        if ([appleScript1 executeAndReturnError:&error1]) {
                            NSLog(@"success!");
                        } else {
                            NSLog(@"failure!");
                        }

After CodeSigning. It only works on my machine and not on other machine. Is it due to code signing or does other mac requires extra permissions.

I tried CodeSigning the application. Post that it stoped working on other machines. I need to get the cron working on all machines any suggestions as to what is going wrong.

0

There are 0 best solutions below