Skip to content

Tag: cron

Cron every minute to trigger url via CURL

I want to set a CRON task to trigger an URL every minutes (via CURL). That seems pretty simple, I searched and wrote this : I added that to the crontab -e and saved. But it seems that the url is not triggered. Don’t understand why, everything seems correct? Can you help me please? Thx. Answer Your cron …

PHP pthreads failing when run from cron

Ok, so lets start slow… I have a pthreads script running and working for me, tested and working 100% of the time when I run it manually from the command line via ssh. The script is as follows with the main thread process code adjusted to simulate random process’ run time. So while the above script…

How does Anacron works in linux?

How does the Anacron runs even after the system shutdowns in linux? How does it look for the commands to run after the system shutdown? Answer If you have a backup script scheduled everyday at 11 PM as a regular cron job, and if your laptop is not up at 11 PM, your backup job will not be executed. However,

Cronjob script isn’t working as expected

I have a script that work perfectly fine when I manually run it by myself, but does not seem to run properly from crontab. The main error is that the (external) environment variables are not being set. I added SHELL=/bin/bash above the cronjob definition but still got the same errors. The script I have copied…

PHP fopen ‘x+’ doesn’t work on ubuntu

I created an application which has an caching script on an Windows/Wamp environment. This script’s caching function is only allowed to run once at the same time. To achieve this I used a ‘locking file’ with check to see if it exists. On windows this script continues to work fine. But now it …

Crontab Entry Causing Unknown Command

The entry Is causing the following error: My script has the shebang at the top: I think the python3 path is correct: As suggested, I looked for a CR but none found: What should I try? Thanks Answer Make sure the end-of-line does not contains Carriage return, but only new line. If there’s carriage return…

CentOS Unix Cron order of execution when all set to same time

I have a series of cron jobs running at the command line calling the php interpreter all by the same user configured to run once a day Do these all execute at once or do the execute in the order of entry in some cron table, complete and move on to the next cron job? Answer And to answer your