TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way to limit pdflatex execution time ?

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

share|improve this question
Pdflatex runs for x seconds. If there was an infinite loop, then being able to limit execution time would stop the compile. – P Magunia 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
up vote 10 down vote accepted

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

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.