Wait for FolderSync to complete...

444 views
Skip to first unread message

Sean Morley

unread,
Aug 20, 2016, 10:35:49 PM8/20/16
to Tasker
So I have FolderSync installed along with Tasker Pro.  In Tasker I'm using the FolderSync plugin to sync media folders between my phone and an FTP server.  Once complete I run a simple media scan app.  To do this I've been using the Wait command and guessing how long it takes to sync the folder before running the media scan but this varies drastically from sync to sync. (could be 2 seconds, could be 5 minutes) Is there a way to have Tasker wait and know when the sync is complete before it continue to the next action?

Eric Kruis

unread,
Aug 21, 2016, 4:20:54 AM8/21/16
to Tasker
Foldersync has a built-in option to do a media scan after syncing. Can't you use that?

Rich D

unread,
Aug 21, 2016, 6:29:44 AM8/21/16
to Tasker Google Groups Post


> So I have FolderSync installed along with Tasker Pro.  In Tasker I'm using the FolderSync plugin to sync media folders between my phone and an FTP server.  Once complete I run a simple media scan app.  To do this I've been using the Wait command and guessing how long it takes to sync the folder before running the media scan but this varies drastically from sync to sync. (could be 2 seconds, could be 5 minutes) Is there a way to have Tasker wait and know when the sync is complete before it continue to the next action?

The way I did this was just after the folder sync action I would enable a profile with a context of state / app / folder sync : services option checked.  Then in the enter task of that profile just use a action / task / stop and in the exit task do whatever you need to do after folder sync ends at the end of the task disable the folder sync profile. 

Sean Morley

unread,
Aug 21, 2016, 1:26:11 PM8/21/16
to Tasker
This doesn't seem to work with 6.0.1.

Sean Morley

unread,
Aug 21, 2016, 1:29:20 PM8/21/16
to Tasker
Thanks for the response Rich,  I'm a bit new to Tasker.  Any chance you could elaborate a little on how to do this?  I"ll try to run with what you've given me for now see if I can figure it out. 
But if it's not too much trouble, a step by step would be very helpful.  :)

Cheers.

Sean Morley

unread,
Aug 21, 2016, 1:40:27 PM8/21/16
to Tasker
Under State / App I only see "Calendar Entry" and "Unread Text".

Sean Morley

unread,
Aug 21, 2016, 2:03:41 PM8/21/16
to Tasker
Here's what I did so far..  I created a Task named "Sync" with one entry in it:
1.  FolderSync
Configuration Folder1;;;SYNC

I then created a second Task named "Scan" with the following:
1.   Launch App
App ScanMediaPlz

Then I created a profile Add>Application>FolderSync and checked "Services" and then attached a task to it:
1.   Stop
Task Scan

Now, shouldn't Running the Sync task satisfy the conditions of the profile?  (FolderSync service runs and then stops) which should then trigger the Scan Task.  This doesn't seem to be working. :(

Rich D

unread,
Aug 21, 2016, 3:23:18 PM8/21/16
to Tasker Google Groups Post


> Here's what I did so far..  I created a Task named "Sync" with one entry in it:
> 1.  FolderSync
> Configuration Folder1;;;SYNC
>
> I then created a second Task named "Scan" with the following:
> 1.   Launch App
> App ScanMediaPlz
>
> Then I created a profile Add>Application>FolderSync and checked "Services" and then attached a task to it:
> 1.   Stop
> Task Scan
>
> Now, shouldn't Running the Sync task satisfy the conditions of the profile?  (FolderSync service runs and then stops) which should then trigger the Scan Task.  This doesn't seem to be working. :(
>

Sounds like you have things mixed up. Here is haow it should look.

Task:  Sync


1.  FolderSync
Configuration Folder1;;;SYNC

2. Enable profile : Folder sync running

Profile: Folder sync running
Context: app / folder sync /services

Enter Task:
1. Stop

Exit task:

1.   Launch App :  App ScanMediaPlz

2. Disable profile:  Folder sync running

To add a exit task - long press the enter task.

Sean Morley

unread,
Aug 21, 2016, 4:22:27 PM8/21/16
to Tasker
Almost there... Where can I find "Enable Profile" and "Disable Profile"? I can't seem to find it in any of the Action Categories.

Rich D

unread,
Aug 21, 2016, 4:25:17 PM8/21/16
to Tasker Google Groups Post


> Almost there... Where can I find "Enable Profile" and "Disable Profile"? I can't seem to find it in any of the Action Categories.
>

Action / tasker / profile status.

Sean Morley

unread,
Aug 21, 2016, 4:51:24 PM8/21/16
to Tasker
Ok so this kind of works.  The problem is the FolderSync service never shuts down after syncing and so the exit task never runs.  As soon as I Force Stop FolderSync through settings, the the exit task runs, ScanMediaPlz runs and the Profile gets disabled. :(  Why does FolderSync keep running after it's finished syncing? 

Sean Morley

unread,
Aug 21, 2016, 4:59:39 PM8/21/16
to Tasker
I actually just realized FolderSync had a Scan Media option in it.  LOL..  So sorry for wasting your time.  Enabling this did the trick for me.  Still going to use Tasker to schedule it and create a widget for it.  Thanks for all the help.  You've stepped my knowledge of Tasker up a notch. :)

Cheers!

Sean Morley

unread,
Aug 21, 2016, 5:06:19 PM8/21/16
to Tasker
Sorry I thought you were talking about Tasker's Media Scan option.  This did the trick Thanks!


On Sunday, August 21, 2016 at 4:20:54 AM UTC-4, Eric Kruis wrote:

Rich D

unread,
Aug 21, 2016, 7:17:18 PM8/21/16
to Tasker Google Groups Post

> Ok so this kind of works.  The problem is the FolderSync service never shuts down after syncing and so the exit task never runs. 

This does not happen on either of my devices.  not sure what the issue could be. The run log would be the next step. menu / more / runlog

Rich D

unread,
Aug 21, 2016, 7:17:32 PM8/21/16
to Tasker Google Groups Post


> I actually just realized FolderSync had a Scan Media option in it.  LOL..  So sorry for wasting your time. 

no worries ....   :)

Rich D

unread,
Aug 21, 2016, 7:17:53 PM8/21/16
to Tasker Google Groups Post


> Sorry I thought you were talking about Tasker's Media Scan option.  This did the trick Thanks!
>

glad you got it sorted out....

Scott Almond

unread,
Aug 24, 2016, 11:45:52 AM8/24/16
to Tasker
I've always just reacted to foldersync notification in tasker. Foldersync provides a notification once sync is complete. You will have to disable grouped notifications in foldersync for it to work correctly. but its a dead simple way to react in tasker once sync is complete.

Rich D

unread,
Aug 24, 2016, 12:59:03 PM8/24/16
to Tasker Google Groups Post


> I've always just reacted to foldersync notification in tasker.

That is most likely the easiest way however you need access to the text within the notification to properly react to it. I am on  Android version 4.1.2  and could not find a way to get this information. Auto notification did not work and notification listener is for a more current android version.

Lukas Degener

unread,
Jan 23, 2017, 4:29:13 AM1/23/17
to Tasker
That somehow doesn't work for me. Neither a failed nor a successful notification triggers any of my events. I did turn off group notification and both apps are on the newest update.

Rich D

unread,
Jan 23, 2017, 4:53:16 AM1/23/17
to Tasker Google Groups Post



That somehow doesn't work for me. Neither a failed nor a successful notification triggers any of my events. I did turn off group notification and both apps are on the newest update.




To post your profile or task here...  Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)

Any linked tasks will be exported with the profile they are linked to..

To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name.  Tasker will list your profile with the context name if you have not given it one).



Message has been deleted

Lukas Degener

unread,
Jan 23, 2017, 8:48:01 AM1/23/17
to Tasker
This is just a very small profile to test the function of AutoNotification and i cannt figure out why it shouldn't work:

Profile: Notify (176)
        Event: AutoNotification Intercept [ Configuration:Event Behaviour: true
Has Reply Action: false
Notification Apps: FolderSync
Notification Text: Sync fehlgeschlagen  (case ins)
Get All Fields : false
Get Internal Actions: false
Get Internal Actions Big: false ]
Enter: Anon (177)
        A1: Variable Add [ Name:%Test Value:1 Wrap Around:0 ]
        A2: Flash [ Text:Sync erfolgreich Long:Off ]
Reply all
Reply to author
Forward
0 new messages