Forums

Scheduled task and console task are running on different machines?

I'm running Slack bot as a scheduled task along this post.

Today I ran the same script from console because my bot was down.

Though I thought the next scheduled task will exit soon because the socket is locked by console task, in fact it ran as another bot so that they duplicated every reply message on my Slack.

It seems that scheduled tasks and console tasks can acquire the same socket at the same time.

It looks quite strange to me. Does anyone know why this problem occurs?

We had some task server trouble which meant that we had to start a new one. In the time when we were starting the new server, some tasks would have been started on the existing one and then, possibly restarted on the new one later.

If you kill the oldest one, then the locking will continue to work in future.

@glenn Thank you for your quick reply.

I understand what is going on.

I killed the oldest task right now and the scheduled task has been started.

It seems to be okay, thanks.