I realize that it can depend on certain things (and obviously how efficient the code is written); but, in general, what is the most suitable and perhaps efficient language to use in writing cron jobs?
Does this simply come down to a question of what is the most efficient language period, or can the specificity of cron jobs determine one programming language over the other?
Also, does MySQL database operations affect the programming language of choice for cron jobs?
Any language (in case of MySQL, any language with mySQL libraries) can be used as long as it has:
Command line interface. Not sure which languages disualify - apparently even LOGO has CLI capable implementations now, though what use is LOGO in background program is somewhat beyond me :)
Resulting code runs on whatever system your cron daemon is on (most usually, a Unix server, but I assume there are cron ports to Windows etc...)
Any other considerations have nothing to do with cron jobs.
Efficiency wise, it depends entirely on what the work done by the job is (but again, not really related to cron-ifying the job).
With some extreme performance-intensive exceptions, choose the best language you can develop in (based on your familiarity with it and the availability of needed libraries).
For performance sensitive code, the usual choice is C++ and/or Assembly for really optimized stuff - but to be honest the whole performance discussion is completely outside the scope of your question and I'm sure has plenty of perfectly-answered question on StackOverflow elsewhere.
Since your code is running unattended at odd hours, you want a language with good error handling and reporting. Namely, it needs to print a traceback when it crashes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With