startup-tasks-automation
TypeScript icon, indicating that this package has built-in type declarations

1.4.1 • Public • Published

Startup Tasks Automation v1.4.1 Documentation

NPM Version Package License

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.

Package Sidebar

Install

npm i startup-tasks-automation

Weekly Downloads

3

Version

1.4.1

License

ISC

Unpacked Size

4.49 kB

Total Files

3

Last publish

Collaborators

  • datomarjanidze