If you can add the direct link from the SRX340 to the SRX240 and treat that as if it were a second ISP. then use the rpm failover between this new link and your local ISP.
https://kb.juniper.net/InfoCenter/index?page=content&id=KB22052
If you can add the direct link from the SRX340 to the SRX240 and treat that as if it were a second ISP. then use the rpm failover between this new link and your local ISP.
https://kb.juniper.net/InfoCenter/index?page=content&id=KB22052