Actually - I found this a bit easier:
INSERT INTO alert_schedule_items (schedule_id, target) (SELECT 1, device_id FROM `devices`);
The schedule ID I am using is 1. This just adds all of the items in one insert query, my only issue with doing it this way is that every time a new device is added the table will need emptied if I want to do this again. Or I guess I could just add the device easily from the webui. Really the only reason I am doing this is because I don’t need alerts after 6pm until 7am the following day so I think I could make a daily job that just does this for me possibly, it’s just a pain after setting up a few hundred devices.