Skip to content

Instantly share code, notes, and snippets.

View crkrenn's full-sized avatar

Chris Krenn crkrenn

  • LLNL; democracyGPS
  • SF Bay Area
  • LinkedIn in/chris-krenn
View GitHub Profile
@crkrenn
crkrenn / save_microsoft_office.js
Last active September 18, 2024 19:12
MacOS apple script to automatically save open Microsoft Office files
// This script saves all open and modified Excel, Word, and PowerPoint documents
// It can be run manually with "osascript -l JavaScript /path/to/your/saved/script.js"
// or scheduled to run periodically using a tool like cron.
// type `crontab -e` to edit the cron jobs
// crontab: */5 * * * * /usr/bin/osascript -l JavaScript /path/to/your/saved/script.js
function run() {
try {
console.log("Script started");