Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ttrentsou-job-scheduling
Advanced tools
A package that allows developers to schedule and manage recurring tasks within applications. This could include support for cron-like scheduling, task dependencies, and error handling.
# Job Scheduling Package
Job Scheduling Package is a simple Node.js package that provides functionality to schedule and manage recurring tasks within a Node.js application.
## Installation
You can install the package via npm:
```bash
npm install job-scheduling-package
```
## Usage
```javascript
const JobScheduling = require('job-scheduling-package');
// Create an instance of JobScheduling
const jobScheduler = new JobScheduling();
// Define a task function
const task = () => {
console.log('Task executed!');
};
// Schedule a job to run the task every 3 seconds
jobScheduler.scheduleJob('TaskJob', 3000, task);
// Cancel the job after 10 seconds
setTimeout(() => {
jobScheduler.cancelJob('TaskJob');
}, 10000);
```
## API
### `JobScheduling`
The `JobScheduling` class provides functionality to schedule and manage recurring tasks.
#### `scheduleJob(jobName, interval, task)`
Schedules a new job with the specified name, interval, and task function.
- `jobName` (string): The name of the job.
- `interval` (number): The interval (in milliseconds) at which the task should be executed.
- `task` (function): The task function to be executed.
#### `cancelJob(jobName)`
Cancels the scheduled job with the specified name.
- `jobName` (string): The name of the job to be cancelled.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
FAQs
A package that allows developers to schedule and manage recurring tasks within applications. This could include support for cron-like scheduling, task dependencies, and error handling.
We found that ttrentsou-job-scheduling demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.