dont think this random thingy is right solution. OK I will reveal my plans now. I have table1 which has column with timestamp, when job is finnished.
select * from table1 where time<=time()
while ...
if status=0
update status=1
RUN the whole script, at the end delete row or change time(script job) & status
else (meaning status=1, someone else run that script)
empty (meaning continue to next line in selected array)
} end of while
This should work I think, but problem is I gain 1 more sql query. so noone login for 1hour, then they come and there are 1000 unprocessed lines in table (time<=time()), that means +1000 sql queries (because of update status=1)
how is this going to affect stability, resources & time needed?