Skip to content

Instantly share code, notes, and snippets.

@tadaken3
Last active July 23, 2016 11:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadaken3/f0f3993c54d114a06602d85d577f09d6 to your computer and use it in GitHub Desktop.
Save tadaken3/f0f3993c54d114a06602d85d577f09d6 to your computer and use it in GitHub Desktop.
OSXでスクリプトを自動実行する方法 ref: http://qiita.com/tadaken3/items/4c39e2d9b31e52e56497
#!/bin/bash
#日付をテキストファイルに保存
cd ~/Desktop
date >> sample.txt
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>sample.time.record</string>
<!--フルパスで指定-->
<key>ProgramArguments</key>
<array>
<string>/Users/username/Desktop/sample.sh</
string>
</array>
<key>StartInterval</key>
<integer>60</integer>
<key>RunAtLoad</key>
<true/>
<key>ExitTimeout</key>
<integer>300</integer>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment