• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Browse and search Google Drive and Gmail attachments (plus Dropbox and Slack files) with a unified tool for working with your cloud files. Try Dokkio (from the makers of PBworks) for free. Now available on the web, Mac, Windows, and as a Chrome extension!



Page history last edited by David B 12 years, 4 months ago

This script checks if it's the last day of the month, or the 15th, and executes only under those circumstances. Then, I put it in the crontab to run every day.


TOMORROW=`/usr/bin/date -d tomorrow +%d`; 
if [ ! ( "$TOMORROW" == "01" -o "$TOMORROW" == "16" ) ]; then 
# Instructions to execute 



And in Perl:



use strict;

my ($mday,$wday,$j);
($j,$j,$j,$mday,$j,$j,$wday,$j,$j) = localtime(time);

#Only run the first saturday of the month
exit unless($wday == 6 && $mday <= 7);

# Instructions to execute 

Comments (0)

You don't have permission to comment on this page.