I have couple of php scripts which are called by cron. The cron job runs every 20 mins. Sometimes script finishes the job in few mins and sometimes it takes more than 20 mins.
I want to prevent the race condition here. One way I have in my mind is to use the database set the flag when page is running and remove flag when the job is done. But I really don't want to use database.
Is there any other solution?