Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct way of setting up "Cron job" in Windows #709

Closed
fumunda opened this issue Aug 24, 2020 · 4 comments
Closed

Correct way of setting up "Cron job" in Windows #709

fumunda opened this issue Aug 24, 2020 · 4 comments

Comments

@fumunda
Copy link

fumunda commented Aug 24, 2020

Thank you for an awesome program!

I have Freescout setup and running (mostly) in IIS for server 2012 R2. Only thing I cannot figure out is how to correctly schedule the fetching of emails. I seem to have an issue with getting the php artisan schedule:run >> /dev/null 2>&1 to work correctly. I have tried running the command from Cygwin in the document root of Freescout and it shows as having run but the System menu does not show an updated task time.

Also the Queue:Work task never actually runs either. I have just today spun this instance up, so I am not too worried about losing anything. I would like to get it to work though, if you have any ideas. I just don't know what I am missing.

Anyone out there using this in IIS successfully that can point me in the right direction?

@freescout-helpdesk
Copy link
Contributor

Here those who managed to install FreeScout on Windows, maybe they can give you an advice:

#245
#478

@fumunda
Copy link
Author

fumunda commented Aug 24, 2020

Yeah I have read both of those posts. Helped me along the way but neither really explain HOW they ended up getting it to work. I am hoping one of them will respond here and maybe give me the shove I need.

Thanks for the response though.

@fumunda
Copy link
Author

fumunda commented Aug 25, 2020

I just went away from IIS and installed Docker for Desktop and did the container from there. Worked like a charm.

Thanks for this wonderful product!

Closing this now.

@fumunda fumunda closed this as completed Aug 25, 2020
@rjamesnw
Copy link

rjamesnw commented Feb 13, 2024

For future reference for others it works for me doing this:

  1. Install cygwin (as specified in the IIS section of the installation instructions). If you don't you'll get errors with ps in it.
  2. Make sure to add the cygwin to the PATH environment variable for the system (mine was C:\cygwin64\bin).
  3. Remove the >> /dev/null 2>&1 part. In windows the >> is for appending output to existing files, and since no such file exists it fails. Seems to run just fine as php C:\inetpub\wwwroot\YOURWEBSITENAME\artisan schedule:run.

Other things to take note of for Windows installations:

  • For some reason the .env config file contained the wrong protocol for APP_URL. Make sure it is https://, since most websites require that these days.
  • Another place the URL is stored is in bootstrap\cache\config.php. I opened the file and replaced all http://YOURWEBSITENAME with https://YOURWEBSITENAME.
  • You may have to run iisreset after making changes.
  • If you continue to have session issues, remember to add the IIS AppPool\YOURAPPPOOLNAME to the folder you configured in php.ini as your session and tmp folders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants