When it comes to scheduling tasks in a Unix-like server environment, ‘cron’ is the preferred choice among most system administrators & engineers. ‘cron’ is however a command-line based utility, and if you’re a desktop user who’s looking for a task scheduler, then something with a GUI is what makes a whole lot of sense 🙂 .
‘When’ in that sense is an interesting task scheduler that’s designed for the GNOME and Ubuntu‘s Unity desktop that features an easy to use minimalist appearance & functionality.
‘When’ lets the user to define when a certain task should be executed based on Time (using the system clock), Intervals (if the task is set to repeat), Command (after running a command prior to the execution of the actual task), Idle (after the system is idle for a certain period of time), Event (system start-up, suspend, shutdown, after connecting to a network etc), File Change (after the state of the file is changed).
You can also change some of its settings and view the history of the scheduled tasks as well.
To be honest, I don’t use task schedulers at all on my desktop so I can’t say a lot about its usefulness. But (just for the sake of testing the app), I just thought of a scenario where I would’ve wanted to copy a certain ISO disc image to a different location, only after it was finished downloaded.
So I first created a Task and then defined the condition by using the Command feature where I used the ‘test’ shell command to make sure the ISO exists and is fully finished downloading (I’ll skip the details). And ‘When’ was able to successfully execute the task. Please bear in mind that ‘When’ is still in its beta stage and perhaps due to that, it somehow failed to add itself to system’s startup after installing, though its quite easy to fix.
Also, I installed ‘When’ on Ubuntu 15.10, but ‘Francesco’ (the author) says he runs it on Ubuntu 14.04 LTS as well. So if interested, here are the installation instructions: First go to this page and download the latest ‘deb’ package and once the downloading finishes, just open it and Ubuntu Software Center will do the rest for you.
After its installed, open up the Startup Applications utility of Ubuntu (by simply searching for it on Dash) and click on the Add button to add a new entry to it.
Now fill in a Name and a Comment (description) and under the Command box, copy & paste the below code:
/usr/bin/env python3 /opt/when-command/./when-command
Then save your changes and reboot (or logout & log-in) and you should see ‘When’ running around the system tray area, indicated by its small alarm clock icon. We’ll, that’s it!.
For more information (a good documentation included), please visit this page.