TaskScheduler issue

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

Moderators: Lapo, Bax

steve13627
Posts: 50
Joined: 06 Dec 2016, 06:27

TaskScheduler issue

Postby steve13627 » 08 Sep 2017, 02:34

Hi, Admin
Is there any different between "SFS2x.sh" and "sfs2x-service". I got the issue like this: If I use the "SFS2X.sh" shell script to start up the server, the scheduler is working fine, it will be trigger. When i use "sfs2x-service " as deamon services, it doesn't work,could you tell me is there any configuration is missing here?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: TaskScheduler issue

Postby Lapo » 08 Sep 2017, 07:41

Hi,
no there is not connection between how your code works and how you start the server.

There must be something else going on. My suggestion is to make sure that you handle errors correctly in your schedule Task. This is a common issue that gets overlooked.

Take a look at this example:
http://smartfoxserver.com/blog/how-to-s ... extension/

Also make sure to check the server logs if something doesn't behave as expected. Chances are you'll find why in the logs.

Let us know
Lapo
--
gotoAndPlay()
...addicted to flash games
steve13627
Posts: 50
Joined: 06 Dec 2016, 06:27

Re: TaskScheduler issue

Postby steve13627 » 18 Sep 2017, 09:55

Hi Lapo,

Thanks for your advise, but the strange thing is when I start the server twice, it is work properly, but it will failure if I start the serivces once.
Any way, I will handle the potential exception as your reminder. Will keep you post if there is any new found.

Lapo wrote:Hi,
no there is not connection between how your code works and how you start the server.

There must be something else going on. My suggestion is to make sure that you handle errors correctly in your schedule Task. This is a common issue that gets overlooked.

Take a look at this example:
http://smartfoxserver.com/blog/how-to-s ... extension/

Also make sure to check the server logs if something doesn't behave as expected. Chances are you'll find why in the logs.

Let us know
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: TaskScheduler issue

Postby Lapo » 18 Sep 2017, 11:08

I would highly recommend to check the logs after launching the service the first time, maybe there's something going on that needs further investigation.

Also, launching the service a second time should fail because the server is already running and you can't start up a new instance on the same ports.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 58 guests