Don't try and make assumptions based on the distro as to what you can and cannot do, for that way lies madness (see also "User Agent detection"). Instead, detect whether what it is that you want to do is supported, and how it's done by whatever command or file location you want to use.
For example, if you wanted to install a package, you can detect whether you're on a Debian-like system or a RedHat-like system by checking for the existence of dpkg or rpm (check for dpkg first, because Debian machines can have the rpm command on them...). Make your decision as to what to do based on that, not just on whether it's a Debian or RedHat system. That way you'll automatically support any derivative distros that you didn't explicitly program in. Oh, and if your package requires specific dependencies, then test for those too and let the user know what they're missing.
Another example is fiddling with network interfaces. Work out what to do based on whether there's an /etc/network/interfaces file or an /etc/sysconfig/network-scripts directory, and go from there.
Yes, it's more work, but unless you want to remake all the mistakes that web developers have made over the past decade or more, you'll do it the smart way right from the start.
When your computer is shut down (or the cron daemon is otherwise not running), cron jobs will not be started.
If you have jobs that you would like to run after the fact during those times when the computer is shut down, use anacron. Installed by default, see "man anacron", "man anacrontab", or the file /etc/anacrontab for more info.
Ubuntu uses anacron by default for crontab entries in:
/etc/cron.daily
/etc/cron.weekly
/etc/cron.monthly
leaving the remaining crontabs to be handled by the main cron daemon, specifically:
/etc/crontab
/etc/cron.d
/var/spool/cron
NOTES
Anacron itself does not run as a daemon, but relies on system startup scripts and cron itself to run.
On the Ubuntu 8.04 box I'm looking at, /etc/init.d/anacron is run at boot, and again by cron each morning at 07:30.
The README at /usr/share/doc/anacron/README.gz has a slight bit more info than is contained in the manpages.
EXAMPLES
For simple "daily", "weekly", "monthly" jobs, put a copy of or a symlink to the script in one of the /etc/cron.{daily|weekly|monthly} directories above. Anacron will take care of running it daily/weekly/monthly, and if your computer is off on the day the "weekly" scripts would normally run, it'll run them the next time the computer is on.
As another example, assuming you have a script here: /usr/local/sbin/maint.sh
And you wish to run it every three days, the standard entry in /etc/crontab would look like this:
# m h dom mon dow user command
0 0 */3 * * root /usr/local/sbin/maint.sh
If your computer was not on at 00:00 on the 3rd of the month, the job would not run until the 6th.
To have the job instead run on the 4th when the computer is off and "misses" the run on the 3rd, you'd use this in /etc/anacrontab (don't forget to remove the line from /etc/crontab):
# period delay job-identifier command
3 5 maint-job /usr/local/sbin/maint.sh
The "delay" of "5" above means that anacron will wait for 5 minutes before it runs this job. The idea is to prevent anacron from firing things off immediately at boot time.
Best Answer
For immediate monitoring you can use iftop. This will show you the currently active connections and the bandwidth they are using. Once you've identified a high traffic connection, find the local port number and use
netstat
to find which process the connection belongs to.For longer term monitoring I would suggest something like darkstat. This can give you a breakdown per host and port which might allow you to figure out what the traffic is related to.