I need to send hundreds or thousands of emails with or without attachments. For this I have thought to use a ContainerAwareCommand that I can launch from the cron and to monitor it using the same console or that I keep certain values in bd in each iteration.
Is there any way to stop or pause a command? Can I have more control or interact?
Is there any better way to do it or monitor it?
If you want to monitor / speed it up maybe you can think about using queue / messaging system.
Which means first you will enter all emails to the queue and then have some consumers/handlers processing them. This way you can monitor progress by queue size and stop them / resume if necessary. This will allow as well to speed up the process by launching more handlers, even on different servers.
In symfony 4.1 there will be new component messenger or you can use for example enqueue library for that.