{"action":"closed","issue":{"url":"https://api.github.com/repos/Wox-launcher/Wox/issues/961","repository_url":"https://api.github.com/repos/Wox-launcher/Wox","labels_url":"https://api.github.com/repos/Wox-launcher/Wox/issues/961/labels{/name}","comments_url":"https://api.github.com/repos/Wox-launcher/Wox/issues/961/comments","events_url":"https://api.github.com/repos/Wox-launcher/Wox/issues/961/events","html_url":"https://github.com/Wox-launcher/Wox/issues/961","id":174898542,"number":961,"title":"how to start a python timer thread in JsonRPCAction","user":{"login":"JGMathematica","id":13813337,"avatar_url":"https://avatars.githubusercontent.com/u/13813337?v=3","gravatar_id":"","url":"https://api.github.com/users/JGMathematica","html_url":"https://github.com/JGMathematica","followers_url":"https://api.github.com/users/JGMathematica/followers","following_url":"https://api.github.com/users/JGMathematica/following{/other_user}","gists_url":"https://api.github.com/users/JGMathematica/gists{/gist_id}","starred_url":"https://api.github.com/users/JGMathematica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JGMathematica/subscriptions","organizations_url":"https://api.github.com/users/JGMathematica/orgs","repos_url":"https://api.github.com/users/JGMathematica/repos","events_url":"https://api.github.com/users/JGMathematica/events{/privacy}","received_events_url":"https://api.github.com/users/JGMathematica/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Wox-launcher/Wox/labels/plugin","name":"plugin","color":"bfdadc"},{"url":"https://api.github.com/repos/Wox-launcher/Wox/labels/question","name":"question","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-03T14:04:42Z","updated_at":"2016-09-03T16:47:56Z","closed_at":"2016-09-03T16:47:56Z","body":"\r\n1. Wox version / commit number: 1.3.183\r\n\r\nAre there any example about start a timer thread in the JsonRPCAction,  I wrote a bus tracking plugin using python 3.5, and would like to add timer to remind me for the coming bus.\r\n\r\nwhat I did is as follow, but there is no response, can anyone tell me what is wrong here\r\n\r\nresults.append({\"Title\": \"Bus Time\", \"SubTitle\": stnow, \"IcoPath\": \"Images/app.ico\",\r\n                            \"JsonRPCAction\":\r\n                                {\r\n                                    **\"method\": \"alarm\",\r\n                                    \"parameters\": [query],**\r\n                                    \"dontHideAfterAction\": True\r\n                                }\r\n\r\n def timer(self,query):\r\n         WoxAPI.show_msg(query, query, \"Images/app.ico\")\r\n\r\ndef alarm(self, query):\r\n       Thread(target=timer,args=(int(query),))"}}
{"actor":{"display_login":"happlebao"}}