---
lang: en
title: 'API docs: cron.ascronjob'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/extensions/cron
permalink: /doc/en/lb4/apidocs.cron.ascronjob.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/cron](./cron.md) &gt; [asCronJob](./cron.ascronjob.md)

## asCronJob() function

A `BindingTemplate` function to configure the binding as a cron job.

<b>Signature:</b>

```typescript
export declare function asCronJob<T = unknown>(binding: Binding<T>): Binding<T>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  binding | <code>Binding&lt;T&gt;</code> | Binding object |

<b>Returns:</b>

`Binding<T>`


