首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏尾尾部落

    Mac中的定时任务利器:launchctl

    launchctl是一个统一的服务管理框架,可以启动、停止和管理守护进程、应用程序、进程和脚本等。 launchctl是通过配置文件来指定执行周期和任务的。 编写plist文件 launchctl 将根据plist文件的信息来启动任务。 更多的命令: # 加载任务, -w选项会将plist文件中无效的key覆盖掉,建议加上 $ launchctl load -w com.demo.plist # 删除任务 $ launchctl unload -w com.demo.plist # 查看任务列表, 使用 grep '任务部分名字' 过滤 $ launchctl list | grep 'com.demo' # 开始任务 $ launchctl > 更多的参数参见:mac官方文档 参考: Mac执行定时任务之Launchctl

    6K50发布于 2018-09-04
  • 来自专栏iOS逆向与安全

    iOS ASO【Inter process Communication】之去掉rocketbootstrap的Depends依赖

    /bin/sh launchctl load /Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist || true launchctl stop /System/Library/LaunchDaemons{BAK,}/com.apple.ReportCrash.SimulateCrash.plist 2> /dev/null || true launchctl com.apple.ReportCrash.SimulateCrash.plist 2> /dev/null || true 卸载rocketbootstrapd的时候执行的脚本:停止 RocketBootstrap launchctl rocketbootstrapd chown root:wheel /Library/LaunchDaemons/com.rpetrich.rocketbootstrapd.plist 2>/dev/null launchctl mv /System/Library/LaunchDaemons{BAK,}/com.apple.ReportCrash.SimulateCrash.plist 2>/dev/null || true launchctl

    92631发布于 2021-03-24
  • 来自专栏代码人生

    macos命令行启动docker服务

    本文链接:https://blog.csdn.net/luo4105/article/details/102819113 通过 launchctl 查看 docker server, 记住docker server 名 launchctl list | grep docker 111117 0 com.docker.docker.2388 然后关闭和启动它。 launchctl stop com.docker.docker.2388 && launchctl start com.docker.docker.2388 或者启动docker.app open /

    11.6K10发布于 2019-11-02
  • 来自专栏自动化、性能测试

    crontab - 解决 mac 下通过 crontab 设置了 Python 脚本的定时任务却无法运行

    OS X 的定时任务统统由 launchctl 来管理的,看看 cron 任务有没有在里面 # 定时任务统统由 launchctl 来管理的,看看 cron 任务有没有在里面 sudo launchctl 查看一下启动项的配置 locate com.vix.cron # 创建一个database sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

    1.8K10发布于 2021-11-18
  • 来自专栏全栈程序员必看

    转:全新安装Mac OSX 开发者环境 同时使用homebrew搭建 (LNMP开发环境)

    You should use launchctl instead. Please feel free volunteer to support it in a tap. 来启动|停止 launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist launchctl load -w ~/Library/ load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist launchctl unload -w ~/Library/LaunchAgents/ load -w ~/Library/LaunchAgents/homebrew.mxcl.php55.plist" alias php-fpm.stop="launchctl unload -w ~/ load -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist" alias memcached.stop="launchctl unload

    1.7K20发布于 2021-05-19
  • 来自专栏白菜博客

    联想&拯救者Y7000&2019&PG0

    list | grep --quiet ALCPlugFix; then sudo launchctl unload $DAEMON_PATH$ALC_DAEMON_FILE fi sudo launchctl load -w $DAEMON_PATH$ALC_DAEMON_FILE } localtime_toggle(){ sudo cp $TMP_PATH fi sudo launchctl load -w $DAEMON_PATH$TIME_DAEMON_FILE } numlock(){ sudo cp $TMP_PATH$ list | grep --quiet setleds; then sudo launchctl unload $DAEMON_PATH$NUMLOCK_DAEMON_FILE fi sudo launchctl load -w $DAEMON_PATH$NUMLOCK_DAEMON_FILE } clear_cache(){ sudo kextcache -

    1.8K30编辑于 2022-03-23
  • 来自专栏Web行业观察

    Mac下禁用一些高占用的进程

    Google 了一下,发现很简单,在 terminal 里执行 launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist 再观察 Activity 重新启用的方法(估计我这辈子都不会启动这货) launchctl load -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist sudo 禁用方法 sudo launchctl unload /Library/LaunchDaemons/com.alipay.DispatcherService.plist 再次查看 system.log Google 到的禁用方法 launchctl unload -w /System/Library/LaunchAgents/com.apple.touchbar.agent.plist 从命令来看,

    6K20发布于 2018-10-11
  • 来自专栏全栈程序员必看

    全新安装Mac OSX 开发者环境 同时使用homebrew搭建 (LNMP开发环境)

    You should use launchctl instead. Please feel free volunteer to support it in a tap. 来启动|停止 launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist launchctl load -w ~/Library/ load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist launchctl unload -w ~/Library/LaunchAgents/ load -w ~/Library/LaunchAgents/homebrew.mxcl.php55.plist" alias php-fpm.stop="launchctl unload -w ~/ load -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist" alias memcached.stop="launchctl unload

    2.3K20发布于 2021-05-19
  • 来自专栏李维亮的博客

    Mac OSX 下安装nginx mysql php 本地开发环境

    安装mysql brew install mysql MySQL开机启动: ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents launchctl 来启动|停止 launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist launchctl load -w ~/Library/ load -w ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist launchctl unload -w ~/Library/LaunchAgents/ load -w ~/Library/LaunchAgents/homebrew.mxcl.php55.plist" alias php-fpm.stop="launchctl unload -w ~/ load -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist" alias memcached.stop="launchctl unload

    2.1K20发布于 2021-07-09
  • 来自专栏效能与质量

    MACOS使用locate命令一直提示:WARNING: The locate database (/var/db/locate.database) does not exist. To create

    To create the database, run the following command: sudo launchctl load -w /System/Library/LaunchDaemons 按照系统的提示,使用sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist这个命令,提示如下: $ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist Password: /System/Library/LaunchDaemons

    1K20发布于 2021-08-25
  • 来自专栏禅境花园

    Mac 中的定时任务

    string>/tmp/test.out</string> </dict> </plist> 大概意思就是没60秒执行一次 /Users/chuchur/crontab-test.sh 加载配置文件 使用 launchctl 加载配置文件 launchctl load com.vix.cron.plist # or # launchctl load /xxx/xxx/com.alvin.crontabtest.plist 不需要定时器了可以卸载 launchctl unload /xxx/xxx/com.alvin.crontabtest.plist 查看有多少作业在执行 sudo launchctl list | grep 'cron' 但是看这个只是简单的任务逻辑 折腾如下: 配置crontab 借鉴下 Linux 定时任务 配置方法 1)确保crontab 在mac上是运行的 # 定时任务统统由 launchctl 来管理的,看看 cron 任务有没有在里面 sudo launchctl list | grep cron # 有记录。

    3.8K30编辑于 2023-01-12
  • 来自专栏游戏杂谈

    Mac下的Jenkins安装

    -delete /Groups/jenkins launchctl 可以理解为执行定时 任务,开机时启动 jenkins。 可以通过 sudo launchctl list | grep jenkins 来查看是否有 jenkins 服务被设置为开机启动,实际 load、unload的是一个 plist文件 ? 停止 Jenkins 服务 sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist 重新启动 sudo launchctl load 总结一下,主要是因为 sudo 这个命令有安全限制的问题,所以才会遇到无法执行“sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist 最后,使用使用修改plist的用户名的帐号,打开 shell 并执行“launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist” 就搞定了。

    2.3K60发布于 2018-11-20
  • 来自专栏九州牧云

    Uninstall all those broken versions of MySQL and re-install it with Brew on Mac Mavericks

    individually mysqldump database_name > database_exportname.sql Stop the database server >= MySQL 5.7 sudo launchctl =/usr/local/var/mysql --tmpdir=/tmp mysql.server start run the commands Brew suggests, add MySQL to launchctl do: mkdir -p ~/Library/LaunchAgents cp `brew --prefix mysql`/*mysql*.plist ~/Library/LaunchAgents/ launchctl

    60410发布于 2019-08-21
  • 来自专栏薛定喵君

    Proxyman CFErrorDomainLaunchd error 9

    # 解决方法 # 查看被禁用信息 launchctl print-disabled system ? # 找到需要解禁的软件(proxyman),运行下面命令解禁 sudo launchctl enable system/com.proxyman.NSProxy.HelperTool

    2.6K70发布于 2021-04-22
  • 来自专栏音视频直播技术专家

    Mac下的 sshd 服务

    启动 sshd 服务 sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist 停止 sshd 服务 sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist 查看sshd服务是否启动 sudo launchctl list | grep ssh know_hosts 作用

    10.6K30发布于 2020-04-01
  • 来自专栏仙士可博客

    Error: EMFILE: too many open files, watch 报错的解决方法

    tioncico@acbc32866c55 ~ % sudo ulimit -n 524288 Password: tioncico@acbc32866c55 ~ % 修改完ulimit -n发现还是会报错 修改launchctl tioncico@acbc32866c55 ~ % launchctl limit  cpu         unlimited      unlimited       filesize                4176            maxfiles    524288         524288          tioncico@acbc32866c55 ~ % sudo launchctl  limit maxfiles 524288 524288  tioncico@acbc32866c55 ~ % launchctl limit                             

    4.5K30发布于 2021-06-10
  • 来自专栏老高的技术博客

    mac下使用brew配置nginx+php+mysql+PostgreSQL

    /homebrew.mxcl.php56.plist ~/Library/LaunchAgents/ # new brew services start php71 启动PHP-FPM # old launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist launchctl unload -w ~/Library/LaunchAgents ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents # new brew services start mysql 运行mysql launchctl wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plist # new brew services start nginx 运行NGINX sudo launchctl

    1.1K50编辑于 2022-12-28
  • 来自专栏全栈程序员必看

    mac笔记本卡顿怎么办_电脑卡顿不流畅怎么办

    第三步: 其他方面的知识: 在doc中执行:(doc就是那个控制台) launchctl stop com.apple.photolibraryd launchctl stop com.apple.photoanalysisd launchctl unload -w /System/Library/LaunchAgents/com.apple.photoanalysisd.plist launchctl unload -

    93120编辑于 2022-10-03
  • 来自专栏菩提树下的杨过

    linux学习:CentOS、Mac上SSH的设置以及SceureCRT中的文件上传下载

    server-ip指centos的ip地址 三、mac机 ssh localhost mac机上的SSH服务默认没开,如果ssh localhost,会提示22端口拒绝连接 3.1.启动sshd服务: sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist 3.2.停止sshd服务: sudo launchctl unload -w /System/Library /LaunchDaemons/ssh.plist 3.3查看是否启动: sudo launchctl list | grep ssh 如果看到下面的输出表示成功启动了: -------------- -

    1.8K50发布于 2018-01-24
  • 来自专栏alanzeng423

    Deploy frp on mac and linux

    LaunchAgents/ 所有用户 /Library/LaunchDaemons/ 系统级别 加载配置文件 sudo chown root ~/Library/LaunchAgents/frpc.plist launchctl load -w ~/Library/LaunchAgents/frpc.plist 启动服务 launchctl start frpc 查看服务状态 launchctl list | grep frpc 或者打开mac monitor查看是否有frpc进程 其他命令 launchctl stop frpc # 停止服务 launchctl unload ~/Library/LaunchAgents/frpc.plist

    1.1K10编辑于 2025-01-14
领券