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.
Executes specified asyncio jobs with a chosen interval. Has relatively small number of features but it's fast.
from aiosched import scheduler
import asyncio
async def test1(a, b, c):
print(f'JOB1 {a} {b} {c}')
async def test2():
print('JOB2')
async def test3():
print('JOB3')
from aiosched import scheduler
loop = asyncio.new_event_loop()
scheduler.start(loop=loop)
# jobs can be added before actual start in pending mode
job1 = scheduler.create_threadsafe(target=test1, args=(1, 2, 3), interval=1)
job2 = scheduler.create_threadsafe(target=test2, interval=0.5)
# run job once after 5 seconds
job3 = scheduler.create_threadsafe(target=test3, number=1, timer=5)
# cancel job 2
scheduler.cancel(job2)
# equal to
job2.cancel()
loop.run_forever()
or run scheduler loop as coroutine:
loop = asyncio.new_event_loop()
job1 = scheduler.create_threadsafe(target=test1, args=(1,2,3), interval=0.1)
job2 = scheduler.create_threadsafe(target=test2, interval=0.1)
loop.run_until_complete(scheduler.scheduler_loop())
pip3 install aiosched
Read AsyncJobScheduler and AsyncScheduledJob classes documentation in pydoc.
FAQs
asyncio job scheduler
We found that aiosched 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.