Hello,
a correction to our answer above: PDF24 does have a hot folder for compressing, since version 11.31.0. Open PDF24 Compress (pdf24-Compress.exe in the PDF24 installation folder) and choose a folder under Hot folder. PDF files placed in this folder are compressed automatically and saved next to the original with the Save file suffix. This works while PDF24 Compress is open.
For unattended runs, for example as a scheduled task, the command line described above remains the way to go.