# Tasks in hardhat

Everything you can do in Hardhat is defined as a task. The default actions that come out of the box are built-in tasks and they are implemented using the same APIs that are available to you as a user.

A task is a JavaScript async function with some associated metadata. This metadata is used by Hardhat to automate some things for you. Arguments parsing, validation, and help messages are taken care of.

Some common examples of the tasks that we use daily are the tasks for compile deploy test etc..

We can see the list of all the available tasks using the command npx hardhat

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675443776113/09f8959a-13bc-47d2-93fe-7c5c707ff5ec.png align="center")

We can also create our own tasks inside the hardhat.config.js file

The basic syntax for creating a task is:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675444436797/6771057c-04fd-4e3c-aad9-322fb8f6b4ab.png align="center")
