the script is easy enough:
set targetFile to "/path/to/target file"
set destinationFolder to "/path/to/destination folder"
set fp to open for accesstargetFile with write permission
writereturn & return & short date string of (current date) tofpstarting ateof
closefp
tell application "System Events"
movefiletargetFiletofolderdestinationFolder
end tell
but it looks like Calendar has blocked running executables from alerts. you have two options then:
- use Calendar to send yourself an email and use a rule action to run the applescript
- use a launchd job to run the script on a schedule
The first is straightforward, if circuitous. the second needs a plist like the following stored in ~/Library/LaunchAgents (edit in the path to the above script, save it as plain text, name the file user.script_runner.by_date.plist; script runs daily at 6pm (18:00))
<?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>user.script_runner.by_date</string>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>/path/to/script/</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>18</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
</dict>
</plist>