## Pages

Gmail is probably the best free email service available. Along with huge storage (7419.900081 MB & counting at time of writing this post), it also provides free pop and imap serivces. Gmail also offers some very interesting features like undo send, offline gmail etc. Here is a partial list of features.

One of the most coolest feature is email alias. Gmail neglects anything in between + (plus) and @. So any email address can be appended by string of your choice. This is particularly useful when you want to sign in to some less reliable site and you suspicious that the site can start spaming you. In case, a filter can easily take care of these spams. Similarly, Gmail do not recognize . (periods) in any email address. Thus you can insert any number of periods in your email id.
• firstnamelastname@gmail.com
• first.name.last.name@gmail.com
• firstname....lastname@gmail.com
• f.i.r.s.t.n.a.m.e.l.a.s.t.n.a.m.e@gmail.com
• first.name...last.name@gmail.com
• firstname.lastname+blog@gmail.com
• firstname.lastname+my.blog@gmail.com
• first.name...last.name+bank@gmail.com
• firstname.lastname+this.site.is.not.good@gmail.com
• firstname.lastname+@gmail.com
• firstname.lastname+...+@gmail.com
• firstname.lastname...+@gmail.com

To matter more interesting Gmail also offers another bonus. Any email ending in @googlemail.com is same as @gmail.com. So, any email sent to firstname.lastname@googlemail.com will also be delivered to your inbox. And yeah, you can replace gmail by googlemail in all the examples above without ruining anything.

Check unofficial user guide and complete gmail tips, if you want to get more out of your gmail.

Enjoy Gmail!!

## cron scripts being executed at wrong time

Checked on: Ubuntu Karmic Koala 9.10

Few days back I was shocked to see that one of my cron scripts was being executed at 3:24PM, which was actually scheduled to be executed at 4AM. Probing with the system logs further revealed that none of the cron scripts were following the specified schedule. After googling a little bit I found that it is a common problem and has been discussed in many forums. Here is a synopsis of the all the discussions.

Cron is a utility, which is supposed to automatically execute specific commands periodically (daily, monthly etc). The preferences of the schedule for root is stored in /etc/crontab file and can be edited directly to make changes. Check this link to understand structure of crontab. Non-root users can also have their own cron schedule but their crontab file are located at different location. So, non-root users are suggested to use following command for editing their crontab. crontab -e Default entry of /etc/crontab is given below: # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user    command 17 *    * * *    root    cd / && run-parts --report /etc/cron.hourly 25 4    * * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6    * * 7    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6    1 * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # Let us examine following line from crontab. 25 4    * * *    root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) It means that cron will execute following command daily at 04:25 AM as root. test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )` The problem lies in first part of the command i.e. test -x /usr/sbin/anacron. The test command checks that whether the file /usr/sbin/anacron exists (& is executable), and if it exists then do not execute the next part (where actually scripts are being called). So, crontab is actually instructing to skip the execution of scripts at the scheduled time, if anacron is installed !! Sounds funny :) Clearly, this anacron is the culprit of all the chaos in schedule.

Anacron performs periodic command scheduling but without assuming that the system is running continuously. Cron schedules are not executed if the system is not running at the scheduled time. Anacron makes sure that these commands are run at the specified intervals as closely as machine uptime permits. Anacron reads a configuration file (/etc/anacrontab) that specifies the jobs Anacron controls, and their periods in days. If a job wasn't executed in the last n days, where n is the period of that job, Anacron executes it. Anacron then records the date in a special timestamp file that it keeps for each job, so it can know when to run it again. So, when a schedule is missed, the job is execute after next boot and a timestamp (depending on period of the job) is fixed for next run. This process may ultimately lead to timestamps which are too much out of the cron schedule. And this creates all the chaos.

Anacron is cron-complement (it requires cron) for laptop and home PC which are not running 24x7. So, Ubuntu Desktop edition have anacron installed by default and the crontab is configured so that cron is over ridden by anacron, if installed. The test commands can be removed from crontab as given below, if this default behavior is not required.

Note:
1. There are some known issues with hardware-clock time, when timezone is different. Check last few sections of this page.
2. fcron is intended to provide better features for periodic command scheduling.