I want to run
sudo airodump-ng -w myfile every ten minutes or so, for m minutes. It does not matter if the running time shifts (that it, if it runs m minutes later each time).
Notice that this is a monitoring program, which won't just output and exit. I suppose the solution for this one question is also valid for similar monitoring programs.
I was thinking about putting something like:
*/10 * * * * airodump-ng mon0 -w myfile
crontab. There is no need to change the myfile name, airodump can correctly check whether myfile exists and create a myfile-02 and so on.
However, how should I stop it running after s secs?
pkill airodump is the only thing I can think of. Is this the best for running it 1 minutes twice an hour?
20,40 * * * * airodump-ng mon0 -w myfile
21,41 * * * * pkill airodump-ng