Using the central scheduler on Windows

1,203 views
Skip to first unread message

jo.b...@gmail.com

unread,
Jun 11, 2015, 10:21:13 PM6/11/15
to luigi...@googlegroups.com
Hey there,
Is Luigi intended to work on Windows? I couldn't find anything in the docs to indicate that it shouldn't, but when I try to run the central scheduler I hit the problem that python-daemon appears to be Unix-only (it tries to import the resource module which is Unix only). Not sure if this is a bug or if Windows is just not a supported OS.
Thanks,
Jo

Alexander Krasnukhin

unread,
Jun 12, 2015, 4:08:13 AM6/12/15
to jo.b...@gmail.com, luigi...@googlegroups.com
What exact error do you get?

The simplest setup should work fine on Windows. Well, it worked at least for us 6 months ago.


--
You received this message because you are subscribed to the Google Groups "Luigi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to luigi-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Regards,
Alexander

jo.b...@gmail.com

unread,
Jun 12, 2015, 12:54:15 PM6/12/15
to luigi...@googlegroups.com, jo.b...@gmail.com
Oh, I just get a python import error on the resource module, since that module does not exist for Windows. Like so:

[py27] <prompt>luigid --background
Traceback (most recent call last):
File "<anaconda path>\Scripts\luigid-script.py", line 9, in <module>
load_entry_point('luigi==1.2.1', 'console_scripts', 'luigid')()
File "<anaconda path>\lib\site-packages\luigi\cmdline.py", line 36, in luigid
logdir=opts.logdir)
File "<anaconda path>\lib\site-packages\luigi\process.py", line 78, in daemonize
import daemon
File "<anaconda path>\lib\site-packages\daemon\__init__.py", line 42, in <module>
from .daemon import DaemonContext
File "<anaconda path>\lib\site-packages\daemon\daemon.py", line 25, in <module>
import resource
ImportError: No module named 'resource'

Alexander Krasnukhin

unread,
Jun 12, 2015, 3:58:25 PM6/12/15
to jo.b...@gmail.com, luigi...@googlegroups.com
Oh, yeah. You can't daemonize.

We solved this issue by not asking luigi to run it in background itself. Instead we simply run luigi scheduler under windows service, so it is run in terminal this way and no need to daemonize it.

bpl...@gmail.com

unread,
Jul 22, 2015, 3:20:59 AM7/22/15
to Luigi, jo.b...@gmail.com
Any guides on how to run it under windows service?

I have no knowledge on how to alter the scripts to do this.

Alexander Krasnukhin

unread,
Jul 22, 2015, 3:45:23 AM7/22/15
to bpl...@gmail.com, Luigi, Jo Balme
Hej,

You need to do it yourself. We use https://nssm.cc to create windows services.
Reply all
Reply to author
Forward
0 new messages