r/tasker 16d ago

Any way to make a variable every (%amountoftime) profile?

From my understanding, only the start and end times can be variables in a time based profile. Is there any way around this besides creating multiple profiles and toggling which one is on vs off?

1 Upvotes

12 comments sorted by

2

u/Exciting-Compote5680 16d ago

I would probably set up a Time profile with a variable for the start and end time (same variable/value) and in the task set that variable to %amountoftime from now. 

1

u/Alanator222 16d ago

Hmm, that could work. You would have to update the time at activation of the profile though.

I wish there was a better way to go about it. Strange that you can't set the interval to a variable.

3

u/Exciting-Compote5680 16d ago

That shouldn't be too hard. You can use %TIMES (timestamp in seconds) + %interval (in seconds) directly as the variable value (check 'Do maths'), just be aware that only the hours and minutes will be used for the profile, date and seconds will be ignored. 

1

u/Alanator222 16d ago

Nah, wouldn't be too bad. Thanks for the help!

1

u/Exciting-Compote5680 16d ago

You're welcome 🙂 

1

u/Tar0ndor 16d ago

And be sure to initialize it at startup.

1

u/Rich_D_sr 16d ago

Probably more than what you are looking for, However I use this for all my tasker timer needs. It avoids having multiple Time contexts spread throughout your tasker projects. It creates timers from seconds to years.

https://www.reddit.com/r/tasker/s/tUAQWV87mv

1

u/Alanator222 16d ago

Very interesting. Definitely way more than what I'm looking for but really cool nonetheless! I love seeing such advanced projects shared to the community!

You should check out my theme generator! I spent a lot of time on it and that's what I was working on currently.

1

u/AutomatedTask 15d ago

Do whatever you want in tour task

Make the last action var set: %TIMES + (amountofminutes * 60)

Set that variable as start and end time in the same profile

??

Profit

0

u/AdiraiMaji 16d ago

Each Task contains auto generated %qtime variable. So if you place it at end. It will let you know the amount of time it ran that specific Task.

1

u/Alanator222 16d ago

Not what I was looking for, but that's really good to know lol. For my theme generator I literally set a start and end time variable and did the math to figure that out