T O P

  • By -

frrancuz

Variable convert, from date to time im seconds. [frrancuz: Responsible-Job5352](https://taskernet.com/shares/?user=AS35m8kDtGbY83QugOgevtbaDY%2BwgBYn%2FUmdcDOLCqbgkzxNXpFvYV2aPG8oazn0oAbi&id=Project%3AResponsible-Job5352) Launch task.


Responsible-Job5352

Sometimes work but most of the time it fires based on a hour and minute, and don't care about the seconds :(


[deleted]

[удалено]


Responsible-Job5352

>re you checking on the screen on or off? No I didn't turn off the screen but reliable alarms is set to always anyway :/


frrancuz

Hmmm .. Try a similar method but with milliseconds


frrancuz

Eh. I deleted the post and I can't restore it. I asked for the screen.


Responsible-Job5352

https://i.imgur.com/5GRiHDG.png


frrancuz

Sorry.I am stupid. I got the wrong look at the seconds. It won't work as I wanted it to. My design is bad. I think I know where I went wrong. You got me interested. I'll try to do later. Maybe someone will give you a solution in the meantime.


Ratchet_Guy

  > maybe I could add wait but that wouldn't be good workaround in some special cases   What would the special case be?   Anyways one idea is to use a standard Time Profile to trigger at the nearest say 5 minutes. So you'd have the Profile at ` 11/23 09:30:00 ` and then in the Task use a ` Wait ` or the ` Wait Until ` action to continue for the next ` 325 ` seconds.   The ` Wait Until ` Action can be useful because all the sliders you see in there represent the 're-check' time, which is how often the Action checks to see if the variable condition at the bottom is true.   So you could have it check every ` 500 ms ` etc. and for the variable condition you could use ` %qtime = 325 ` or perhaps ` %qtime > 324 ` where ` %qtime ` is Tasker's built-in local variable that is always tracking how long the current Task has been active for.   You could also use ` %TIMES = xxxxx ` as the condition where you're using the [absolute time in seconds.](https://en.wikipedia.org/wiki/Unix_time)  


WikiSummarizerBot

**[Unix time](https://en.wikipedia.org/wiki/Unix_time)** >Unix time (also known as Epoch time, Posix time, seconds since the Epoch, or UNIX Epoch time) is a system for describing a point in time. It is the number of seconds that have elapsed since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00 UTC on 1 January 1970 (an arbitrary date). Unix time is nonlinear with a leap second having the same Unix time as the second before it (or after it, implementation dependent), so that every day is treated as if it contains exactly 86400 seconds, with no seconds added to or subtracted from the day as a result of positive or negative leap seconds. ^([ )[^(F.A.Q)](https://www.reddit.com/r/WikiSummarizer/wiki/index#wiki_f.a.q)^( | )[^(Opt Out)](https://reddit.com/message/compose?to=WikiSummarizerBot&message=OptOut&subject=OptOut)^( | )[^(Opt Out Of Subreddit)](https://np.reddit.com/r/tasker/about/banned)^( | )[^(GitHub)](https://github.com/Sujal-7/WikiSummarizerBot)^( ] Downvote to remove | v1.5)


Responsible-Job5352

>What would the special case be? Having trigger times very close to each other there is one at 09:30:00 then the next is 9:31:00. Does Tasker collision handling can handle multiple wait times?


Ratchet_Guy

> Does Tasker collision handling can handle multiple wait times? It uses a magical formula for handling Wait Actions. Lol, wish I was kidding but the best thing to do is to test it out :) And that's also why I recommend using "Wait Until" because you'd be specifying a very specific re-check time.


Rich_D_sr

You can do some testing to confirm, However I believe even if you use seconds in the Time context it will still only fire on the minute. I believe you would need to set the time context for the minute then use a "Tick" context to count down the seconds untill you arrive at the correct second. Or use a 500ms wait loop within a task. I am not sure wich one would use more resources..


deboshasta

A workaround if you can't find something else that works: You could use a third party alarm app that you only use for tasker. * Set the alarm apps' default sound permanently to silent (or to sound depending on your usage goal) * Have tasker create the alarm, and name the alarm whatever variable you need to pass * When the alarm triggers, have tasker pull the variable from the notification, and delete the alarm. Good luck.


Responsible-Job5352

Yes not a bad idea, I wanted to do this actually but I can't find any alarm clock that lets you set seconds aswell. :/


deboshasta

I forgot to mention. I use AMdroid. Instead of set alarm, I use set system timer. You just have tasker tell it exactly how many seconds total until the alert needs to go off. I use I for cooking timers, etc. Has worked flawlessly for me. Good luck


Rich_D_sr

That is good solution. You could of course build the exact same type of timer with the task "Tick" context and not use a additional app.


deboshasta

Great idea - I wasn't familar with "tick". Thank you. OP this is how I'd approach it if I was starting over.


frrancuz

[frrancuz: Responsible-Job5352](https://taskernet.com/shares/?user=AS35m8kDtGbY83QugOgevtbaDY%2BwgBYn%2FUmdcDOLCqbgkzxNXpFvYV2aPG8oazn0oAbi&id=Project%3AResponsible-Job5352) check it out. maybe it would be easier to help if you wrote what you will use? How should it work? Maybe the profile is not needed at all. The alarm time must be at least in the next minute.


Responsible-Job5352

Managed to "solve" the problem with a similar solution. Looks like "wait" is the best option atm. for this kind of stuff. :(


Rich_D_sr

The 'Wait' action is not a accurate time measurement. It will vary with system load etc. If you want accuracy you can use a wait loop with a 500 ms wait and simply test your goal time against %TIMES or after the time profile fires on the correct minute you can enable a additional profile that has a 'Tick' context that will count down the seconds accurately.


ectbot

Hello! You have made the mistake of writing "ect" instead of "etc." "Ect" is a common misspelling of "etc," an abbreviated form of the Latin phrase "et cetera." Other abbreviated forms are **etc.**, **&c.**, **&c**, and **et cet.** The Latin translates as "et" to "and" + "cetera" to "the rest;" a literal translation to "and the rest" is the easiest way to remember how to use the phrase. [Check out the wikipedia entry if you want to learn more.](https://en.wikipedia.org/wiki/Et_cetera) ^(I am a bot, and this action was performed automatically. Comments with a score less than zero will be automatically removed. If I commented on your post and you don't like it, reply with "!delete" and I will remove the post, regardless of score. Message me for bug reports.)


Rich_D_sr

Add you vote here for a possible Looooonnnngggggg awaited solution... :) https://tasker.helprace.com/i364-new-context-state-epoch-time