snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

snipeit.sh doesn't create schedule:run cron

Open tiagom62 opened this issue 9 years ago • 4 comments

Expected Behavior (or desired behavior if a feature request)

Installer should create appropriate scheduler cron. ie.. */10 * * * * /usr/bin/php /var/www/html/snipeit/artisan schedule:run >> /dev/null 2>&1

ref. https://snipe-it.readme.io/v3.6.2/docs/configuring-alerts-backups


Actual Behavior

It does not.

Do others agree? If so i will patch and submit a PR. Additionally how often should it run? I currently run every 10 minutes.


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

  • Version of Snipe-IT you're running v3.6.6 build 1 (gee2c67a)
  • What OS and web server you're running Snipe-IT on centos 7 apache
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) install.sh
  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
  • What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproduceable on the demo.
  • Include any additional information you can find in app/storage/logs and your webserver's logs.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

tiagom62 avatar Jun 13 '17 23:06 tiagom62

The commands involved only run at most once a day, so running every ten minutes will do nothing 143/144ths of the time.

mnemonicly avatar Jun 14 '17 00:06 mnemonicly

That's fine, we can run it once a day. The example given at https://snipe-it.readme.io/v3.6.2/docs/configuring-alerts-backups is at one minute.

tiagom62 avatar Jun 14 '17 01:06 tiagom62

The every-minute polling for this scheduling functionality comes from the framework documentation: https://laravel.com/docs/5.4/scheduling

The application keeps track of it's own schedules, there's no reason to change the cronjob.

HinchK avatar Jun 15 '17 12:06 HinchK

Added to CentOS 7 in PR #4096. I will add it to the other distros shortly.

tiagom62 avatar Oct 04 '17 22:10 tiagom62