5 ms·
How has cron support been coming along? I have also been wanting to play with connecting a WSL Rails app to IIS :)
by thrownaway954 7y ago
How has cron support been coming along? I have also been wanting to play with connecting a WSL Rails app to IIS :)
- dleslie 7y agoThe trick to cron is to have WSL always "running". In my case, I use X410+WSL and have a xfce panel always active on my desktop, and that is sufficient to keep WSL alive and so have a working cron.
- thrownaway954 7y agoso cron is working now in it? I will definitely try it out again. also... why do you mean by "running"? it's basically a vm so as long as i have a command prompt open, it should be running, correct? it would be cool if there was a way of keep it up and running like a regular vm.
- dleslie 7y agoWhen you close the shell it sort of sleeps; there seems to be some hooks to allow it to wake on request, for ssh, but for the most part the system sleeps and won't wake until a shell is opened. I get around this by having an X app always running, and its behaviour is sufficient to prevent WSL from sleeping. Some folks I know just leave the shell open, but having an xfce panel is desirable to me.
- pkulak 7y agoIf you used systemd instead of cron it would at least run as soon as it came back, if it was out when it should have run. That's usually sufficient for backups and such.
- dleslie 7y agoBut then I'd have to run systemd. WSL's Ubuntu by default does not have systemd. #> systemctl System has not been booted with systemd as init system (PID 1). Can't operate.
- thrownaway954 7y agothat is strange that they put it to sleep like that. I wonder what the reason is and if there is an actual supported way to prevent this and use it like a regular VM?
- dleslie 7y agoI suspect it is a bug.
- nailer 7y agoIsn't there anacron for this? (also does systemd handle this stuff now?)