Ok, here's the situation - at work I have a script which I have to run every morning to run some checks. If I forget and something has gone wrong then it will take me ages to fix! So, I created a script which does the checks and emails me if there is an issue. I was going to cron this to just run on weekdays however our unix admins won't allow us to use cron because they say it's too much hassle when doing backups etc because no matter what rules you put in, users end up writing their own "critical" processes which then need to be dealt with etc. This is fair enough. Mine isn't critical btw, it just makes my life a bit easier!
They do however let the "at" command be run. So - my idea was to create a script which at the bottom works out the next week day and re-submits itself after running using the "at" command.
My only issue is with the dates. How do I increment the current date by one? Obviously just adding one to the day isn't good enough because at month end this buggers up and also different months have different days. I'm loathed to write a long piece of code to calculate what month it is, whether adding one has crossed a month boundary etc... Surely there must be a more simple way!?? We have perl installed if that's any help.
One thing I did consider is that we use Oracle, so I could just sqlplus the output of TO_CHAR(SYSDATE)+1.
Has anyone any better ideas??
Thanks