In my current job we needed to automatize some processes by using Windows Task Scheduler; I wrote a batch file, which you may find useful,
especially when you don't have direct/remote access to user's desktop.
The main problem of implementation this task was Windows Vista/7 with its UAC, I had to use powershell to get Admin privileges by popping a window prompt to user directly to accept rather than have the user type the password manually upon the request.
I searched and searched for the answer to the following question: «How do I change the font size in grub2?» It seems that no one on the entire Internet knew!
Well, I did a lot of digging into the grub2 documentation and the scripts bundled with Ubuntu and I finally have the answer!
1. Pick a font you want to use for your menu. I recommend a nice easy-to-read monospace font such as DejaVu Sans Mono (it's in the example below).
2. Convert the font to grub2's format using the grub-mkfont command, taking the extra step of setting the font size:
FYI: I believe the "--size=" indicates point size but I'm not entirely sure (the documentation doesn't say). If it is based on the point scale I don't believe it is taking dpi into account since I tried "--size=72" on a 120dpi display and letters were only about half an inch tall (72 points is precisely one inch).
#!/bin/bash
MUSER="root"
MPASS="password"
MHOST="localhost"
MYSQL="$(which mysql)"
MYSQLDUMP="$(which mysqldump)"
BAK="/mnt/backupdir"
GZIP="$(which gzip)"
NOW=$(date +"%d_%m_%Y")
for i in `find $BAK -ctime +22`; do rm $i; done
[ ! -d $BAK ] && mkdir -p $BAK
DBS="$($MYSQL -u $MUSER -h $MHOST -p$MPASS -Bse 'show databases')"
for db in $DBS
do
FILE=$BAK/$db.$NOW.gz
$MYSQLDUMP -u $MUSER -h $MHOST -p$MPASS $db | $GZIP -9 > $FILE
done
it deletes every 22 days old backups if you want to change life-time,
you can change the value of ctime in the followed line: for i in `find $BAK -ctime +22`; do rm $i; done
If you have mysql running on windows platform for example for development/testing purposes, you are probably encountered the backing up issue
here are small bat file that can help you.
First of all you will need 7-zip for archiving SQL dumps, you can download it and use for free, from here