# Possible to run lua script from lualatex after main compilation has been done?

Is there any way to call a lua script automatically immediately after lualatex finishes(and pass the jobname)?

Basically I need to do some post process and cannot do it within the same job so I would like to run a script immediately after if it exists and pass to the script the jobname.

-
No idea if there exists a luatex specific solution. But you can reprocess a tex document inside a compilation with a new jobname. See e.g. this example (the source was a posting in c.t.t.) mrunix.de/forums/showpost.php?p=298567&postcount=7 –  Ulrike Fischer May 14 '12 at 10:39
possible duplicate of Lualatex after pdf is generated –  Jake May 15 '12 at 14:35