Skip to content
Advertisement

Is it possible to set timer with local time in Linux?

I’m on my IOT project with raspberry pi,

And I want to raise event in certain time like 06:00:00 and 12:00:00

But I can’t do this with jiffies because jiffies only counts the time since the os started.

I have an Idea :

I may raise interrupt every second and check local time, compare it with certain time.

But I think it is very bad way

Do you have any good idea for this problem?

Thanks in advance.

Advertisement

Answer

Run a cron at 06:00:00 and 12:00:00. Trigger your event through cron.How to create a cronjob

Advertisement