Suitable language for cron Jobs?

I understand that this may depend on certain things (and, obviously, how efficient the code is written); but, in general, what is the most appropriate and possibly effective language for writing cron work orders?

It just comes down to the question of what is the most efficient language period, or can the cron job specification define one programming language over another?

Also, do MySQL database operations work in the selected programming language for cron jobs?

+3
source share
4 answers

Any language (in the case of MySQL, any language with mySQL libraries) can be used as long as it has:

  • . , disualify - -, LOGO CLI- , , LOGO , :)

  • , cron ( Unix, , cron Windows ..)

cron.

, , ( -, cron-fying ).

, , , ( ).

- ++ / , , , , , StackOverflow .

+4

, . , .

+1

cron, , bash ( ). , , ++, , ( , t, a bash script .)

PHP, cronjob - PHP-, cron.php.

, , cron, MySQL bash, . PHP/script , - ( MVC ), php -f <php_script.php> cron.

0
  • Bash: , , , MySQL.

  • Perl: , Unix , . , .

  • Python: ubiquitous, but may be older versions (all that Python 2.3+ is good, and you are unlikely to find older in the wild), excellent libraries, ease of use, supported code due to stronger syntax than perl. It may be a little harder to find people who already know this, but shouldn't be so hard to slip away.

Both Perl and Python have extensive time-tested MySQL bindings and become standard, like bash, on almost all Unix executable operating systems.

0
source

Source: https://habr.com/ru/post/1735079/


All Articles