Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to write a script only does the things it is supposed to do on a specific weekday BUT if I miss days it should do the commands of those days too.

The original script only did the things for the specific day:


wdate=$(date "+%w")
case $wdate in
    0)# Sunday
# And so on…

So please help me with that script

share|improve this question
What is it that you are trying to do with your script? Please elaborate. Schedule running of other programs? If so, you're better off using crontab to specify days of the week. –  Herman Torjussen Jan 13 '13 at 22:27
@bender: This is actually on topic here, as well –  Scott Severance Jan 14 '13 at 7:24
@htor I want to run certain rsync on certain folders. I know that I have folders which will onlly change on a certain weekday. –  user122019 Jan 16 '13 at 16:39
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.