Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

 
discard

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

Browse other questions tagged or ask your own question.