tmp.m
file:
tmp = Table[RandomReal[], {3}, {4}]
Export["test.xlsx", tmp]
Quit[]
Then
echo "./math -script tmp.m" | at now
Works fine, but it does not close the kernel. The process will be still running.
BUT if I edit tmp.m
to
tmp = Table[RandomReal[], {3}, {4}]
Export["test.PDF", TableForm@tmp]
Export["test.xlsx", tmp]
Quit[]
Then
echo "./math -script tmp.m" | at now
Will not run. It does not even save the xlsx
file.
So two questions:
How to export PDF file?
How to make Quit[]
in a script file?
/proc/<PID>/cwd
; to close themkill -TERM <PID>
. You will need to become familiar with how your computer is set up and how to work with it, not only for your own sake but because otherwise you risk annoying the administrators and other users with your failed jobs. $\endgroup$Quit[]
is not needed ) running directly (i don't haveat
). Its either a version issue or something peculiar aboutat
. $\endgroup$