This file contains hidden or 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
#!/bin/bash | |
# | |
# Check CPU usage | |
# | |
# === | |
# | |
# Examples: | |
# | |
# check-cpu.sh -w 85 -c 95 | |
# |
This file contains hidden or 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
on run argv | |
-- Check if enough arguments are provided | |
if (count of argv) < 5 then | |
display dialog "Please provide the number of days to consider, minutes of margin time, the generic busy event summary, the busy calendar name, and at least one target calendar name." | |
return | |
end if | |
-- Extract arguments | |
set daysToConsider to item 1 of argv as number | |
set marginTimeInMinutes to item 2 of argv as number |
OlderNewer