# Installation

## 🚀 Quick Start

### Installation

Add **TimesAPI** to your project:

#### Maven

```xml
<repositories>
    <repository>
        <id>mongenscave-releases</id>
        <url>https://repo.mongenscave.com/releases</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.mongenscave</groupId>
        <artifactId>mc-TimesAPI</artifactId>
        <version>1.0.0</version>
    </dependency>
</dependencies>
```

#### Gradle

```groovy
repositories {
    maven {
        url "https://repo.mongenscave.com/releases"
    }
}

dependencies {
    implementation 'com.mongenscave:mc-TimesAPI:1.0.0'
}
```

> ⚠️ **Important:** Shadow JAR Required\
> TimesAPI requires proper shadowing to include all dependencies. Make sure to use the Shadow plugin in your build.

***

#### Gradle Shadow Plugin

```groovy
plugins {
    id 'com.github.johnrengelman.shadow' version '8.1.1'
}

shadowJar {
    archiveClassifier.set('')
    mergeServiceFiles()
}
```

***

#### Maven Shade Plugin

```xml
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.4.1</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
        </execution>
    </executions>
</plugin>
```

***

### 🧪 Basic Usage

```java
import com.mongenscave.timesapi.TimesAPI;

public class MyApplication {
    public static void main(String[] args) {
        // Create TimesAPI instance
        TimesAPI scheduler = new TimesAPI();

        // Schedule a daily task
        scheduler.schedule("EVERYDAY @ 18:00", () -> {
            System.out.println("Daily backup started!");
        });

        // Schedule a weekly task
        scheduler.schedule("EVERY MON,WED,FRI @ 09:30", () -> {
            System.out.println("Weekly report generation");
        });

        // Don't forget to shutdown when your app closes
        Runtime.getRuntime().addShutdownHook(new Thread(scheduler::shutdown));
    }
}
```

***

Learn more @ [Github Repository](https://github.com/MonGen-s-Cave/mc-TimesAPI)
