I am using J-Scheduler to schedule a recurring task which basically performs some database queries. I have found a lot of information about how the scheduler handles multi- threading scenarios in case of a single schedule but, I am not sure how my
thread will behave in case I have multiple schedules running in parallel and accessing the same database tables and possibly executing the same tasks but with different parameters.
E.g:
Schedule 1 - schedule to run every 1 min and select all the records from Table A and Table B.
Schedule 2 - schedule to run every 4 hrs and select all the records from Table A and Table C.
Now after 4 hrs schedule 1 and schedule 2 will run in parallel. Will I have database consistency or locking problems for table A or is it that even in this case only 1 schedule will execute at a time and the other one will be waiting.