Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
![](/static/devrant/img/pipeless-devrant-banner-white.png)
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "cronjobs"
-
I found weird that some developer never ask why when facing a problem. "What do you mean never ask why?" here some story.
Let's say a developer work with simple app. Laravel as Backend and Postgresql as Database. He face a problem that the app very slow when searching data.
In order to solve that problem he implement cache using redis but he found problem that it fast occasionally. In order to solve that problem he implement elasticsearch because he think elasticsearch very good for search but he found another problem that sometimes data on postgresql out of sync with data on elasticsearch. In order to solve that problem he implement cronjobs to fix out of sync data but he found another problem that cronjobs cannot fix out of sync data in real time. and so on...
Do you see the problem? He never ask why the app slow. Which part search the data? Backend or Database (Search in the Backend mostly slower than Database because Backend have to get all data on database first). Has the query been optimized? (limit offset, indexing). How about the internet connection? etc.
For me it's important to ask why when facing a problem and try to solve the problem as simple as possible.2 -
Management: Add my email(personal) in the bcc of all the transactional mails (which includes forget password, email confirmation, payment, booking etc) we are sending in this project just to check the fucking cronjobs are working properly.7
-
Not exactly a data loss, but on server hosting almost all of clients' websites.
$ crontab -e
Except finger slipped and it became -r. *facepalm*1 -
My most shameless hacks mostly include cronjobs that run every 5 minutes to cleanup or fix some faulty stuff...
-
What is the best alternative to cronjobs, guaranteeing high availability and jobs not being duplicated?6