# startup-tasks-automation

> 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.

Latest version **1.4.1** (published 2023-10-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install startup-tasks-automation
pnpm add startup-tasks-automation
yarn add startup-tasks-automation
bun add startup-tasks-automation
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2023-10-27 |
| First published | 2022-04-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Dato Marjanidze |
| Maintainers | datomarjanidze |
| Keywords | startup tasks, automation, automate tasks, node.js automation |

## Links

- npm: https://www.npmjs.com/package/startup-tasks-automation
- Repository: https://github.com/datomarjanidze/startup-tasks-automation
- Homepage: https://github.com/datomarjanidze/startup-tasks-automation#readme
- Issues: https://github.com/datomarjanidze/startup-tasks-automation/issues
- npm.io page: https://npm.io/package/startup-tasks-automation

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.4.1 (latest) — 2023-10-27
- 1.4.0 — 2023-06-10
- 1.3.2 — 2023-05-01
- 1.3.1 — 2023-05-01
- 1.3.0 — 2023-05-01
- 1.2.0 — 2023-05-01
- 1.1.0 — 2023-05-01
- 1.0.0 — 2022-04-18

## README

## Startup Tasks Automation v1.4.1 Documentation

<p align="center">
  <a href="https://www.npmjs.com/package/startup-tasks-automation" target="_blank"><img src="https://img.shields.io/npm/v/startup-tasks-automation.svg" alt="NPM Version" /></a>
  <a href="https://www.npmjs.com/package/startup-tasks-automation" target="_blank"><img src="https://img.shields.io/npm/l/startup-tasks-automation.svg" alt="Package License" /></a>
</p>

### Table of contents

- [Description](#Description)
- [Installation](#Installation)
- [Usage example](#Usage-example)
- [API](#API)
- [Tip](#Tip)

### 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

```console
npm i startup-tasks-automation
```

### Usage example

```javascript
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`
    ```ts
    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`.

---
_Source: https://npm.io/package/startup-tasks-automation · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
