Insurance premium reminder: Another step to my automated reminder service

I already had set up a reminder process using which I get periodic notification to back up my data. This time I applied the same thought along with email reminder for my due insurance premiums. It’s true that insurance providers send a reminder SMS/ email just before the due date, but I’ve had the experience when their SMS gateway was jammed due to heavy traffic and I got reminder post one month of my due date! So better to be safe than sorry. I kept those due dates in my reminder service.
Continue reading

More: Array Subset, loop and xargs

Last week I had a requirement to fetch details of some records. For simplicity let’s assume records are id of some entity; I need to get details from an API for those id. Let’s also assume that API accepts 100 id at maximum in a single request. I’d almost 1 million id to fetch details.
Continue reading

Anacron for specific user

Few days ago I was working to set up a backup reminder process for myself. After having few searches I observed anacron fits the best to solve my requirement- sending notification at certain frequency and at my availability too. The issue is sytem’s default /etc/anacrontab by default works for root user. We can execute a job for other users too by adding new group and user to the same. When I did that I saw though the execution time has been logged successfully but that job was silently failing to notify me. So I left that approch and setup a separate anacron instance to run for my profile.
Continue reading

Automated reminder service for backup

I’m very much used to with cron jobs which are used frequently to schedule tasks. Cron can run as often as every minute. But it assumes that the system is running continuously and if the system is not up at the time when a job is scheduled, that job is not executed. I was in need of something like cron but the executing time must be dynamic. More specifically I had to run a backup reminder process in my local system automatically on a certain period frequency and only when the system is on.
Continue reading

Multi-processing using shell script

I love concurrency. Writing a concurrent program is always complex. There are different technologies which are most suitable to do this job. In an earlier post I briefed how to achieve parallelization using PHP. Parallel processing can be done using shell script also; by spawning multiple child processes. It’s fairly simple to handle basic concurrent tasks in that manner.

A basic example to achieve the same-
Continue reading