Unable to sign MacOS application from cronjob

Unable to sign MacOS application from cronjob

macos catalina crontab
macos crontab log
crontab macos mojave
crontab mac python
mac cron gui
macos launchctl cron
mac schedule jobs
mac crontab every 5 minutes

I have a script that builds and codesign an application bundle for MacOS. When I run it from my user's profile, the application is correctly signed, and I can install it on other machines.

The command used is codesign -s <identity> -v <path>, where identity is found by security find-identity -v -p codesigning

But when I run the same script from cronjob, I got an error

error: The specified item could not be found in the keychain.

How it is possible to sign the application from cronjob?

One solution could be to create a separate keychain with the codesigning certificate and pass the keychain path as an argument to codesign as:

codesign -s < identity> --keychain < keychain path> -v < path>

Foundation Mac OS X Web Development, As time goes on, applications get bigger and bigger, and do all manner of Classically, cron performs log directory cleaning so that long-lived systems don't​  On macOS High Sierra, * * * * * open -a TextWrangler ~/notes.txt; open -a Notes; works as is for me, both apps come to the front. Try adding ; osascript -e 'tell app "TextWrangler" to activate' -e 'tell app "Notes" to activate' to the end of your existing command and see if that makes any difference. – user3439894 Nov 1 '19 at 3:52

Changed from cronjob to launchd and the codesign -s < identity> --keychain < keychain path> -v < path> is OK

Scheduling Jobs With Crontab on macOS, Automatic running can be achieved on macOS (and Linux) by In case it tells you that the setup failed, double-check your cron expression. If you are on a Mac (or Linux), you can use our good friend crontab, which is a scheduling tool that will run jobs (scripts) at regular intervals. crontab You add a job to crontab by editing the job list.

Move signing certificates from the login keychain to the system keychain.

Mac OS X Help Line, Tiger Edition, The actual Timbuktu application is located elsewhere, most likely in your TECHNICALLY SPEAKING Log Files and cron Jobs Mac OS X maintains numerous  iTerm.app ==> /Applications/iTerm.app Like @n8henrie , I thought that the programs actually accessing the files like restic would be the ones that require FDA but instead it seems that the programs making the initial sudo request need the FDA: cron in the automated case, and iTerm.app in the manual case.

Where is the cron log file in MacOSX Lion?, By default, cron does not log output of executed jobs. It is possible to log the fact that cronjobs have been executed, but that is not the default on OS X either. error messages out when they're application errors, and not errors generated by the program's actual execution. I was able to find cron-job log in, Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more Unable to execute python script from Crontab on Mac

How to Fix Cron Permission Issues in MacOS Catalina & Mojave , While there are numerous reasons a cronjob may fail, strict security the Terminal application to the Full Disk Access options to fix “Operation  How to Give System Permissions for Apps on MacOS Catalina. Starting with macOS 10.14 Mojave, Apple has introduced a new security feature that ensures third-party applications work safely with your data.

Essential Mac OS X Panther Server Administration: Integrating Mac , Integrating Mac OS X Server into Heterogeneous Networks Michael Bartosh, they've failed, and processes that fail soon after initialization are not restarted (the the foreground is recommended. cron One additional aspect of Mac OS X Server PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin HOME=/var/log # #minute hour mday  If you don't want to to crontab -e to edit it using vim, run this beforehand to use nano instead: export EDITOR=nano ; export VISUAL=nano Note the asterisks means it will run every minute, every hour and every day, so it will probably get VERY annoying unless you remove it.