Last active
August 29, 2015 14:04
-
-
Save CLCL/4d611211728e2bf8ba06 to your computer and use it in GitHub Desktop.
Mac OS Xにはもはやcronがないのでlaunchdに定時実行を登録する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>mikudayo</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>say</string> | |
<string>-v</string> | |
<string>Kyoko</string> | |
<string>初音ミクだよー</string> | |
</array> | |
<key>StartInterval</key> | |
<integer>15</integer> | |
<key>StandardErrorPath</key> | |
<string>/dev/null</string> | |
<key>StandardOutPath</key> | |
<string>/dev/null</string> | |
</dict> | |
</plist> | |
<!-- | |
例として、15秒ごとに「初音ミクだよー」としゃべります(Kyokoが)。 | |
設定 | |
$ vi ~/Library/LaunchAgents/mikudayo.plist | |
設定を登録 | |
$ launchctl load ~/Library/LaunchAgents/mikudayo.plist | |
設定を解除 | |
$ launchctl unload ~/Library/LaunchAgents/mikudayo.plist | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment