# Limit pdflatex execution time

Is there any way to limit pdflatex execution time ?

It would be nice if the value could be added to the texmf file.

-
Pdflatex runs for x seconds. If there was an infinite loop, then being able to limit execution time would stop the compile. –  Sisyphus Oct 17 '13 at 23:12
@Werner perhaps someone on the internet suggested adding `a\let\par\empty\hrule` to your document. –  David Carlisle Oct 17 '13 at 23:30
@DavidCarlisle: You just became that "someone on the Internet"... –  Werner Oct 17 '13 at 23:33
@Sigur It will make tex loop forever, but so long as you can kill the job that's not a problem. It won't destroy any files. –  David Carlisle Oct 18 '13 at 0:44

Using arara: Refer Page 62 Chapter 7 there is an `--timeout n` flag that terminates the execution of any engine. I think there is no in built flag for `pdftex` engines I suppose

"This flag sets an execution timeout for every task. If the timeout is reached before the task ends, arara will kill it and interrupt the process- ing. The n value is expressed in milliseconds". From arara User Manual

`arara` has been integrated with IDE's (Chapter 4 of User Manual) and it's author is Paulo Cereda et al

Ex command line: `arara file.tex --log --verbose --timeout 10` for 10 milli second run

-
Holy cow, I almost forgot `arara` had this option! `:)` Damn those authors. –  Paulo Cereda Oct 17 '13 at 23:31
@PauloCereda Credits to the Authors of arara manual that once read it goes directly into head and does not require multiple passes :) –  texenthusiast Oct 17 '13 at 23:32
@PauloCereda reading the manual is cheating :) –  cmhughes Oct 17 '13 at 23:34
@cmhughes: C'mon Chris, I can't even remember what I had for lunch today. `:P` –  Paulo Cereda Oct 17 '13 at 23:50