Thanks you for considering my package. The code from @pixel27 is right, you can use it directly in the crontab. I personally use a small script “jclient” that is actually:
#!/bin/bash
julia -e ‘using DaemonMode; runargs()’ *
to make more easy to run, to use Daemon I simple change “julia script.jl” to “jclient script.jl”.
I actually does not use it with cron, but il should be run without any problem.
I have never use “@reboot”, however. If that option is not working I suggest to have the following crontab:
30 0 * * * julia --startup-file=no -e 'using DaemonMode; serve()'
0 1 * * * julia --startup-file=no -e 'using DaemonMode; runargs()' path/to/script1.jl <arguments>
0 2 * * * julia --startup-file=no -e 'using DaemonMode; runargs()' path/to/script2.jl <arguments>
0 3 * * * julia --startup-file=no -e 'using DaemonMode; runargs()' path/to/script3.jl <arguments>
0 4 * * * julia --startup-file=no -e 'using DaemonMode; sendExitCode()'
I have add a line before all script starting the server, and after running all script you can add the line julia --startup-file=no -e ‘using DaemonMode; sendExitCode()’
to close the server. You should assure that it is run only when the last script has finished.