Installation | laravel-schedule-monitor-rust | Spatie       

 SPATIE  

laravel-schedule-monitor-rust
=============================

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Laravel-schedule-monitor-rust](https://spatie.be/docs/laravel-schedule-monitor-rust/v1)  Installation

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/laravel-schedule-monitor-rust/v1) 

  Installation    
- [ Introduction ](https://spatie.be/docs/laravel-schedule-monitor-rust/v1/introduction)
- [ Support us ](https://spatie.be/docs/laravel-schedule-monitor-rust/v1/support-us)
- [ Installation ](https://spatie.be/docs/laravel-schedule-monitor-rust/v1/installation-and-setup)
- [ Usage ](https://spatie.be/docs/laravel-schedule-monitor-rust/v1/usage)
- [ Monitoring and Oh Dear ](https://spatie.be/docs/laravel-schedule-monitor-rust/v1/monitoring)
- [ Testing ](https://spatie.be/docs/laravel-schedule-monitor-rust/v1/testing)
- [ Changelog ](https://spatie.be/docs/laravel-schedule-monitor-rust/v1/changelog)
- [ Customization ](https://spatie.be/docs/laravel-schedule-monitor-rust/v1/customization)
- [ Registering application commands ](https://spatie.be/docs/laravel-schedule-monitor-rust/v1/scheduled-commands)

 Installation
============

###  On this page 

1. [ Set up the monitor ](#content-set-up-the-monitor)
2. [ Configure the host ](#content-configure-the-host)

- Use Rust 1.99 or newer and `laravel-rust =0.1.0`.
- Clone this repository next to your application. The crate is not on crates.io and has `publish = false`.
- Add the dependency, selecting your application's database driver:

```
[dependencies]
spatie-laravel-schedule-monitor = { path = "../laravel-schedule-monitor-rust", default-features = false, features = ["database-mysql"] }
```

- Import the library as `spatie_schedule_monitor`.
- Enable `database-mysql`, `database-postgres`, or `database-sqlite`. SQLite is enabled by default for local testing. Storage uses the framework's default connection and application clock.

Set up the monitor
--------------------------------------------------------------------------------------------------------------

1. Define your tasks and attach each definition to a native task. Follow the runnable [usage example](usage).
2. If another schema owns the default table names, select unused [table names](usage#table-names) before cloning or installing the monitor. Prefixes such as `rust_` are supported.
3. Install once with `monitor.install(builder)` or `providers.add(service_provider(monitor))`. The package-tools provider registers listeners, commands and typed `Config` defaults. It does not migrate or schedule work during boot.
4. Run `monitor.migrate()` in an application-context database migration. It creates missing tables and adds nullable package columns to an existing monitor schema. It rejects incompatible tables without converting or dropping them.
5. Run `schedule-monitor:sync`, then configure the host to invoke native `schedule:run` every minute. This package does not start a scheduler or worker.

Configure the host
--------------------------------------------------------------------------------------------------------------

- Use `without_overlapping()` with a shared lock-capable cache when multiple runners can execute the same task. An in-memory cache only coordinates one process.
- Allow long-running scheduler invocations. A 45-minute grace period does not extend the host's process timeout.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
