GSoC week 3: Creation of timer playground app

Harish Anand
2 min readJun 6, 2016

--

This week’s work was on creating the display of all loaded timers next run time and last run time. Also the playground app for the timer is currently being developed and screenshot of completed work is also shown here.

Shows next run and last trigger time in timer tab of services.

Here is the pull request for the added feature.

  1. For special cases where last run time is not known, it displays them as “not known”.

2. For services other than timers it displays Description, Id, Current State as a header to table.

Timer Playground app

Work completed so far, lets us set up a monotonic (boot-time) timer and calendar timers. Completed work on calendar timer includes repeat hourly, repeat daily and repeat weekly. Currently I’m developing repeat monthly.

Monotonic timer that sets a timer after 10 min from boot up.

This creates a test.timer and test.service file as follows:

Service file

[Unit]
Description=test
[Service]
Type=oneshot
ExecStart=/usr/bin/sh-c’/usr/bin/date>>/tmp/date’

Timer file

[Unit]
Description=test
[Timer]
OnBootSec=10min

Calendar timer that repeats every hour at 20th, 35th and 46th minute.

This creates a test.timer and test.service as follows.

test.service

[Unit]
Description=test
[Service]
Type=oneshot
ExecStart=/usr/bin/sh-c’/usr/bin/date>>/tmp/date’

test.timer

[Unit]
Description=test
[Timer]
OnCalendar=*-*-* *:20,35,46:00

Similarly one can create calendar timer that repeats daily and weekly.

Also, check at services/timer tab to see the newly created timer. Playground app doesn’t get updated when a new timer is created. It only shows loaded timers.

Pending Playground work!

  1. Currently there is no checking for the inputs user gives. Functions for all the error input cases that can occur is needed.
  2. save button doesn’t close the modal.
  3. Repeat monthly, Repeat yearly is still left to complete.

Here is the timer playground link.

--

--