Scheduled Task getting stopped automatically

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Rakesh
Posts: 9
Joined: 23 Dec 2016, 13:33

Scheduled Task getting stopped automatically

Postby Rakesh » 05 Jan 2017, 04:39

Hello ,
I am using java programming language at server side. I have handled exception handling properly. But some time sfs stop scheduled task automatically. I have no idea how is it.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Scheduled Task getting stopped automatically

Postby Lapo » 05 Jan 2017, 08:10

Hi,
sounds strange. Only an exception can shut down your tasks.

Can you show me the code of the Task? Also how do you know exactly that it has stopped running?
Are there any server side errors that may have to do with the stopped task?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Rakesh
Posts: 9
Joined: 23 Dec 2016, 13:33

Re: Scheduled Task getting stopped automatically

Postby Rakesh » 05 Jan 2017, 09:18

No exception show on server.

scheduler = sfs.getTaskScheduler().scheduleAtFixedRate(new GameExtension.GameLogicThread(), 0, 1, TimeUnit.SECONDS);
It run first time fine but after 3 or 4 time it stops automatically and server stop shows traces .
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Scheduled Task getting stopped automatically

Postby Lapo » 05 Jan 2017, 11:14

What I wanted to see is the actual Runnable :)
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Stevenor and 95 guests