Currently I'm using /usr/bin/ifNotNearMidnight as:
#!/bin/bash
t=$(date +\%H\%M)
if [[ "$t" > 2350 ]] || [[ "$t" < 0010 ]]
then
exit 1
fi
And then in cron:
* * * * * ifNotNearMidnight && ( cd /blah/ ; doTheThing )
Currently I'm using /usr/bin/ifNotNearMidnight as:
#!/bin/bash
t=$(date +\%H\%M)
if [[ "$t" > 2350 ]] || [[ "$t" < 0010 ]]
then
exit 1
fi
And then in cron:
* * * * * ifNotNearMidnight && ( cd /blah/ ; doTheThing )