Category: Technology
I work in technology sector. And I do round a clock, not only from 9 to 5. It is my bread and butter, it is my hobby, it is the fascination of my life. And with the current rate of change particular in information technology (IT), there is always something new to learn, to try, to talk about. I often post news, thoughts, and reviews. And when I do, this is the category I use.
Shortcode Suggest Helps You Discover Shortcodes in WordPress
You Might Not Need jQuery
Quick server update
And here is the moment we’ve all been waiting for … every single site on this server is now served by Nginx. Ā Of course, there is Apache behind for now to smooth out the migration, but The World Domination is right around the corner.
P.S.: Placeholder websites are served by another instance of Nginx, which runs inside an OpenVZ virtual machine.
P.P.S.: Can anybody make any sense out if it?
3 things to remember when writing cron jobs
Here is a reminder to myself with three things to remember when writing cron jobs. Ā Surprisingly, even after doing it fairly frequently for years and years, I still get caught by one of these once in a while.
- User. Ā Just because the script is working fine under your user, it doesn’t mean it will work well from crontab. Ā Cron jobs are often executed under a different user account. Ā Check, don’t assume. Ā And be noisy about permissions and other possibly related issues.
- Environment. Ā This is slightly related to the previous point. Ā But just because something works fine from the command line, doesn’t mean it will run smoothly as a cron task. Ā Anything that requires particular environment variables, user input, or being executed in a specific directory should be double checked.
- Duration. Ā Cron executes tasks on schedule. Ā It doesn’t really care if the previous instances finished running. Ā So, either make sure the script can run several instances simultaneously, or using a locking mechanism, to make sure two instances don’t step on each other’s toes.