how to prevent multiple pg_dump to execute at the same time
You could check if there is running pg_dump process by looking at the pg_stat_activity and also the state of the process:

SELECT 
    pid,
    datname,
    usename,
    state
FROM pg_stat_activity 
WHERE 
    application_name = 'pg_dump';


It would be better if you could also lock some file with your script when you are starting pg_dump and check the lock status of that file when starting new pg_dump to avoid re-triggering.