1.4.1 • Published 7 months ago

startup-tasks-automation v1.4.1

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Startup Tasks Automation v1.4.1 Documentation

Table of contents

Description

This package can be used to automate tasks that need to be executed when you boot your device, for example, open Google Chrome, Slack, some project in VS Code, etc.

Installation

npm i startup-tasks-automation

Usage example

import { StartupTasksAutomation } from 'startup-tasks-automation'
const startupTasksAutomation = new StartupTasksAutomation([
  {
    executable: `C:/"Program Files"/Google/Chrome/Application/chrome.exe`,
    delay: 5_000
  },
  {
    executable: `C:/Users/datomarjanidze/AppData/Local/slack/slack.exe`,
    delay: 10_000
  },
  {
    executable: `code C:/Users/datomarjanidze/GitHub/googleapis/nodejs-storage`,
    delay: 15_000
  }
])

startupTasksAutomation.initiateBootSequence()

API

class StartupTasksAutomation

  • Models
    • ITask
      interface ITask {
        executable: string
        delay: number
      }
  • Constructor parameters
    • tasks ITask
      • executable string absolute path to your executable.
      • delay number time in milliseconds, in case you want to balance device load between tasks execution
  • Methods:
    • initiateBootSequence()
      • Returns: void
      • Description: starts tasks execution

Tip

Above code example can be then transformed as an executable, for example you can use NPM package called pkg in the following manner pkg /path/to/my-automation-script.js --targets win and this will generate an exe file which then can be copied to the folder where startup executables reside, e.g. on Windows this is C:/Users/<username>/AppData/ roaming/Microsoft/Windows/Start Menu/Programs/Startup.

1.4.1

7 months ago

1.4.0

12 months ago

1.2.0

1 year ago

1.1.0

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.0.0

2 years ago