Using xelatex, I generate a large PDF file (in terms of size and number of pages) by combining a quite high number of files with pdfpages plus other text in Latex. It takes considerable time to generate the file each time I make changes and besides I have to run xelatex multiple times until all the references and TOC entries are correctly resolved and updated. Therefore, I looked at "latexmk -xelated myfile" as a possible solution to ease the process, but sometimes I get an error when latexmk converts itself the xdv file into a pdf file (this is strange because the error is not shown if I manually convert the xdv file to a pdf file myself by calling xdvipdfmx myself). Maybe it is a temporary random error, but it is quite annoying as I have to re-start the process afterwards, and this is time consuming.
-Any ideas about why this may happen? -Are there better alternatives than latexmk? (I considered rubber, but it does not seem to work in Windows).
Thank you for any suggestion.