I want to stop dropbox from running as soon as I log into my account. Now I know I could do this simply by going to Startup Applications and disabling dropbox. But I was wondering if there is a cron-ish way of doing it or is cron not supposed to be used for stuff like these?Currently I have this in my crontab@reboot pkill dropboxBut this doesn't work, because I guess dropbox isn't running when this cron-job runs.
Killing a process with cron as soon as it starts
linux;cron
The @reboot entry is there for doing things after each reboot. That is not what you want.Cron is not the right tool for this, as it starts something at a specific time and it has no clue about you being logged in or being in the process of logged in. At most a cron job run every minute could look if you are logged in and then take action. It is better to try and kill dropbox (using pkill e.g.) with a Startup application.