Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrome-cli in crontab of MacOS may not work properly #74

Open
shooter556 opened this issue Nov 25, 2022 · 1 comment
Open

chrome-cli in crontab of MacOS may not work properly #74

shooter556 opened this issue Nov 25, 2022 · 1 comment

Comments

@shooter556
Copy link

Using "terminal" or even "remote terminal" (ssh) in macOS works just fine with chrome-cli.
All you need to do is just click on "OK" when some privacy notification windows pops up.
Then some entries will just appear in "Privacy" -> "Automation", indicating that some apps are allowed to access chrome's data directories.
But when I try to add some script regarding "chrome-cli" in "crontab".
(For example, just "chrome-cli chrome version" as simple as it is)
It will just print (null) on screen or file.

Is there any workaround for this?
I searched on the internet, unfortunately we can never add/remove apps manually in "Privacy" -> "Automation" configuration.
What I guess is that all I need is adding "cron" in "Automation".

@shooter556 shooter556 changed the title chrome-cli in crontab may not work properly chrome-cli in crontab of MacOS may not work properly Nov 25, 2022
@nagakirankys
Copy link

As a workaround, add a LaunchAgent (that runs periodically) to dump the chrome-cli output to a file and let "cron" job read from this file. Have tried invoking "chrome-cli" from LaunchAgent is working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants