Category: Programming
A big part of my work has to do with code. I’ve worked as system administrator – installing, patching, and configuring someone else’s code. I’ve worked as independent programmer, writing code on my own. I also programmed as part of the team. And on top of that, I worked as Team Leader and Project Manager, where I had to interact a lot with programmers. Programming world on its own is as huge as the universe. There is always something to learn. When I find something worthy or something that I understand enough to write about, I share it in this category.
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.
testling-ci – run your browser tests on every push
browserling – interactive cross-browser testing
Ratchet – WebSockets for PHP
Ratchet is a loosely coupled PHP library providing developers with tools to create real time, bi-directional applications between clients and servers over WebSockets. This is not your Grandfather’s Internet.
