
Research
/Security News
737 Chrome VPN Extensions Linked to Brand Impersonation and Browser Traffic Redirection
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.
@metamask/cronjob-example-snap
Advanced tools
MetaMask example snap demonstrating the use of cronjobs in snaps
@metamask/cronjob-example-snapThis snap demonstrates the use of the endowment:cronjob permission to
periodically execute a function.
Note: Using cronjobs in your snap requires the
endowment:cronjobpermissions. Refer to the documentation for more information.
Along with other permissions, the manifest of this snap includes the
endowment:cronjob permission:
{
"initialPermissions": {
"endowment:cronjob": {
"jobs": [
{
"expression": "* * * * *",
"request": {
"method": "execute"
}
}
]
}
}
}
A snap can schedule one or more cronjobs by specifying an array of jobs in
the endowment:cronjob permission. Each job is defined by an expression and
a request object. The expression is a cron expression that defines the
schedule of the job. The request object defines the JSON-RPC request that
will be sent to the snap's onCronjob handler when the job is executed.
In this example, we schedule a job that executes every minute. When the job is
executed, the snap's onCronjob handler is called with the following JSON-RPC
request:
{
"method": "execute"
}
For more information, you can refer to the end-to-end tests.
FAQs
MetaMask example snap demonstrating the use of cronjobs in snaps
The npm package @metamask/cronjob-example-snap receives a total of 1,142 weekly downloads. As such, @metamask/cronjob-example-snap popularity was classified as popular.
We found that @metamask/cronjob-example-snap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers 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
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.