2 ms·
Out of interest, if you run this using a cron job, what happens after the call has been placed - does the server keep running? I've had a need for a sort-of vol
by RossM 13y ago
Out of interest, if you run this using a cron job, what happens after the call has been placed - does the server keep running? I've had a need for a sort-of volatile web server to respond to requests like this before.
- johncoogan 13y agoThe server only needs to stay up for a minute while you pick up the phone and accept the call, so a simple sigterm can be called from a bash script a few minutes later to shut everything down. You could also probably write this in Python, but I'm not sure exactly how. The server will keep running if you don't kill it, but it shouldn't matter too much because the port will be occupied and when it runs the next time, the new instance will error out, and Twilio will contact the old server (if it's still running). Does that sound reasonable?