• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Tasker and Auto Sync

Hey everyone,

I just got tasker and have been trying to find a way to have auto sync turn on for a few minutes every hour to check mail, and update calendar and contacts so I can help conserve battery life. Is there any way to do this using tasker? Any help with this problem would be much appreciated!

Gelu
 
You would do this with a repeating time context. Something to keep in mind is that repeating time contexts are normally active for 1 minute each time they repeat. This may not be long enough for Sync to do its job. But there's a way around this. Create a profile with a repeating time context:

Context: Time [From: unchecked] [Repeat: Every 1 hour] [To: unchecked]

Add actions to the Enter Task to turn Sync on, wait two minutes, and then turn Sync off:

Auto-Sync [Set: On]
Wait 2 minutes
Auto-Sync [Set: Off]

Due to the normal behavior of having repeating time profiles active for 1 minute, the way this is setup now, Tasker will turn off Sync after one minute, when the profile goes inactive (because that's how it was set when Tasker entered the profile). This will happen during the two minute wait. Here's where we get around this problem. At the profiles list screen, tap on the task for this new profile and tap Move to Exit. Tasker will now execute this task when it exits the profile instead of when it enters the profile. And since anything affected by an Exit Task is not restored by Tasker, because Tasker assumes that if you set it in an Exit Task, that's the way you want it set, regardless of how it was set before.

You may need to adjust the wait time depending on how quickly Auto-Sync completes.
 
  • Like
Reactions: dan55 and Gelu
Upvote 0
Hi UncleMike, I've been trying to create this profile, but I've got a problem at the last step: I can't find the way to make it an Exit Task. If I tap on the task I've got four options: Add task, Edit, Name, ReSelect (or something like that, I've got it in Spanish) but nothing like "Move to exit" If I tap on the help icon of the task, it tells me that it is an Enter Task and that profiles generally can only have one Enter Task. Any idea of what have I to do?? Thank you for your help

P.S.: If it helps, I've got the 1.1u2m versi
 
Upvote 0
omg can you please tell me exactly how to do this?

i cant figure it out
thanks

i would want it to sync my accounts every 5 minutes if possible

Below should be a good start for what you would like to do. With auto-sync off and the profile below... you should be able to control the period at which syncs occur.

Tasker/Synker Sync Every X Minutes

- Create a new profile
- Select "Time" for the first context
- Check the "From" time and set the "From" time to 0:00
- Check the "To" time and set the "To" time to 23:59
- Check "Repeat" and enter the period at which you would like syncs to occur (5 mins, etc)
- During Task selection, add a new task
- Enter the task name
- Click the "+" button to add an "Action"
- Select Plugin
- Select Synker
- Click edit
- Select the specific account you would like to sync (Gmail, Facebook, etc)
- Click Save
 
Upvote 0
hi guys,

just got Tasker to help me with my battery issues on my desire -and was totally stumped until i found this thread :D

ive now got a auto 3g on/off profile running! :D great

the challenge now is to prevent it turning 3g off if im using phone i guess :/ erm.......

cheers
dan

...oh, it stopped :/ no idea why - and wont go active now ??

is was a no start or end time profile - says midnight as a greyed out default

i did manually select 3g on via phone dialogue - but not sure why that stopped profile :/
 
Upvote 0
Below should be a good start for what you would like to do. With auto-sync off and the profile below... you should be able to control the period at which syncs occur.

Tasker/Synker Sync Every X Minutes

- Create a new profile
- Select "Time" for the first context
- Check the "From" time and set the "From" time to 0:00
- Check the "To" time and set the "To" time to 23:59
- Check "Repeat" and enter the period at which you would like syncs to occur (5 mins, etc)
- During Task selection, add a new task
- Enter the task name
- Click the "+" button to add an "Action"
- Select Plugin
- Select Synker
- Click edit
- Select the specific account you would like to sync (Gmail, Facebook, etc)
- Click Save

How would you go about to make additional conditions to this? Like increasing sync rate when charging, or at home? Or is it not possible to retrigger whole day time events?
 
Upvote 0
I'm late to this thread. Let's say I wanted to turn off autosync when the screen is off. Would this work? Is there a chance it wouldn't reenable sync when the screen came back on and I need to add an additional task?

Profile set for display off
1 Action If %SCREEN ~ Off
2 Set Auto-Sync Off
3 Wait 25 minutes
4 Set Auto-Sync On
5 Wait 5 minutes (to give plenty of time)
6 Goto 2
7 End
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones