autostart

command module
v0.0.0-...-18e2ee1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

AutoStart

This project is a Go application that manages processes and schedules tasks based on a configuration file. The application is designed to handle process termination, window management, and batch file execution on Windows systems.

Features

  • Terminate existing processes by name.
  • Close old command prompt windows.
  • Execute a batch file based on the schedule defined in a YAML configuration file.
  • Schedule tasks using a cron-like scheduler.

Getting Started

Prerequisites
  • Go 1.17 or higher
  • Access to a Windows system for process management and window handling
Installation
  1. Clone the repository:

    git clone https://github.com/citizen-nsl/autostart.git
    cd autostart
    
  2. Initialize the Go module:

    If not already initialized, create a go.mod file by running:

    go mod init autostart
    
  3. Install dependencies:

    Install the required Go packages using:

    go get github.com/StackExchange/wmi
    go get github.com/robfig/cron/v3
    
  4. Prepare configuration file:

    Create a file named m308.yaml in the root of the project directory with the following format:

    schedules:
      path:
        batch_file: "path/to/your/batchfile.bat"
        fxserver: "path/to/fxserver.exe"
        server: "path/to/server.exe"
      schedule:
        - time: "12:00"
        - time: "18:00"
    

    Replace the paths and times with your actual values.

Running the Application

To run the application, use:

go run autowithu.go
go build
./autostart

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址