M
M
mihass2020-11-16 21:20:39
linux
mihass, 2020-11-16 21:20:39

How to determine the successful completion of the printing process under linux?

There is a Raspberry PI in the local network, files that need to be printed fall on it from the outside into a certain folder. After printing, the files should be deleted.
The problem is that files can be either 2-3kb or 40-50Mb. The latter simply contain hundreds of sheets.
How to implement the process correctly? A new file has appeared -> we print -> we are waiting for the successful completion of printing -> we delete the file. In this case, the file should not be deleted before it is printed and the file should not be printed 2 times.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2020-11-17
@402d

lp -m closest to the desired . but it's send a letter.
If on the knee, then once a minute we
transfer files from the PRINT folder to the PRINT folder,
run the print for the transferred file, the
second script runs once an hour and deletes files older than 2 hours in the PRINT folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question