A
A
Ainur Shakirov2014-11-10 22:17:54
ubuntu
Ainur Shakirov, 2014-11-10 22:17:54

In what language can you write a "forever-working" script?

There is a simple server on ubuntu server.
There are a few personal tasks that need a script that always works.
I tried it with php+cron, but it doesn't work.. It's inconvenient...
I think that you can still try it with node.js, or start learning Java.. It seems to be always and everywhere needed.
In what language can I write a script that can be run on a server with Ubuntu so that it is always on, able to work with the Internet (primitive requests) and easier to learn ..?)
For example, what I want to do: Autoresponder (vk, icq ), a bot for an online game, the introduction of statistics (collection and analysis of information from several sites), etc.
Thanks for the help.
Threat I know hp, js, delphi and a little bit of c ++ (under development). Maybe something like this will work...

Answer the question

In order to leave comments, you need to log in

4 answer(s)
3
3ton, 2014-11-12
@Fqyeh29

The version written in PHP came up to us.
We inserted it into cron and registered the launch every minute
. We create a lock in it in mysql and check for its presence in order to prevent the execution of more than one script at the same time.
Everything has been working great for several years now.

M
Matvey Kukuy, 2014-11-10
@Matvey-Kuk

I advise you to write in the most convenient language for development, but tie the executable file to another daemon that will monitor its state and reraise it if necessary.
For example, I couldn't write nodejs applications that don't leak, so they restart every night in normal mode. The same is true with python, a lover of eating memory and not giving up, and with c ++, in which a non-current application is even more difficult to write.
As an option for such monitors: mmonit.com/monit or supervisord. If they tell me something cooler, I will say thank you. When I was looking, I didn’t find software that would restart when the processor, disk and memory were glutted, and even monitor the response speed of the service, and, of course, restart ...

S
Sergey Lerg, 2014-11-11
@Lerg

Python or Node.js

A
Alexander, 2014-11-11
Madzhugin @Suntechnic

And what does the language have to do with it, and why is it just a service with respawn not suitable?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question