You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
considering the Pareto distribution in my own crontab
(i.e. most of the jobs run at a specific time of day)
I suggest an option to compactly specify time and/or date
(perhaps -h for human)
it seems reasonable to expect ordered input
(i.e. big to small: month day hour:minute:second)
and each unit can be easily parsed with the usual syntax
(alternation, range, star, repetition)
snooze -h string
string -> date time | date | time
date -> month d | month | d
month -> $(date +%b)*
time -> H:M | H:M:S
* also useful to allow date +%a for option -w and date +%b for option -m date +%a -> locale's abbreviated weekday name (e.g., Sun) date +%b -> locale's abbreviated month name (e.g., Jan)
The text was updated successfully, but these errors were encountered:
For such a tool it may be reasonable to use things like GNU date's -d flag to synthesise the snooze command-line.
In one such script I do this to expose the date string to the user with the following:
# In bash you could use process substitution:# read -r w h m s < <(date -d "$date" +'-w%w -H%H -M%M -S%S')# snooze -v "$w" "$h" "$m" "$s"
date -d "$date" +'-w%w -H%H -M%M -S%S'| {
read -r w h m s
if snooze -v "$w""$h""$m""$s";then
...
fi
}
considering the Pareto distribution in my own crontab
(i.e. most of the jobs run at a specific time of day)
I suggest an option to compactly specify time and/or date
(perhaps -h for human)
snooze -h 11:51
->snooze -H 11 -M 51
snooze -h "Feb 9"
->snooze -m 2 -d 9
snooze -h "Feb 9 11:51:37"
->snooze -m 2 -d 9 -H 11 -M 51 -S 37
it seems reasonable to expect ordered input
(i.e. big to small: month day hour:minute:second)
and each unit can be easily parsed with the usual syntax
(alternation, range, star, repetition)
* also useful to allow
date +%a
for option -w anddate +%b
for option -mdate +%a
-> locale's abbreviated weekday name (e.g., Sun)date +%b
-> locale's abbreviated month name (e.g., Jan)The text was updated successfully, but these errors were encountered: