Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am learning to develop an application by using Quickly (quickly create ubuntu-application). This application will stay in Application Indicator / Notification Bar and only work when a defined "alarm" is triggered by the time or the main window is opened by the user. What is the recommended way to implement the "alarm" so it minimizes the CPU works and saves the battery?

Other issue to be considered is that the user may change the system date & time.

Currently I have these:

  • Using gi.repository.GLib.timeout_add_seconds(60, . . .) to check every minutes, so it will not miss if the user update the system date & time.
  • Using cron; the problem will be the communication between the UI program and the triggered program (by cron).
  • Using a sleeping thread; not sure.

Maybe you have another better idea? Technical explanation are welcomed :). — Thank you

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.