# Enabling cron job

**URL:** <https://community.kinsta.com/t/enabling-cron-job/599>\
**Category:** Application Support\
**Created:** [April 15, 2021, 7:35am UTC](https://community.kinsta.com/t/enabling-cron-job/599 "2021-04-15T07:35:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Saravana\_Kumar](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/saravana_kumar/32/423_2.png) [@Saravana\_Kumar](https://community.kinsta.com/u/Saravana_Kumar)\
**Post date:** [April 15, 2021, 7:35am UTC](https://community.kinsta.com/t/enabling-cron-job/599/1 "2021-04-15T07:35:43Z")

</div>

Hi @michael Can you please help me on how to enable CronJob in my local machine for DevKinsta?

If i run ‘ **crontab -e** ’ its showing command not found.

> root@fffe3743e04a:/www/kinsta/public# crontab -e  
> bash: crontab: command not found

When i see it in my wordpress backend, i got the below.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/00dd919a8ad8167afd4d2574dd3e00d22f77f2c6.png)

---

<div class="post-metadata">

**Author:** ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)\
**Post date:** [April 15, 2021, 5:00pm UTC](https://community.kinsta.com/t/enabling-cron-job/599/2 "2021-04-15T17:00:00Z")

</div>

Hi @Saravana_Kumar . I hope you don’t mind. I’ve moved your post into a new thread to avoid confusion with the other one.

I’m afraid crontab/cron jobs are not enabled by default on our Docker environment. Typically this wouldn’t be something you want enabled for the local environment. With a bit of tweaking, it’s [certainly possible to do](https://stackoverflow.com/questions/37458287/how-to-run-a-cron-job-inside-a-docker-container).

As for the cron events failing locally, would you happen to have [crons disabled via wp-config.php](https://kinsta.com/knowledgebase/disable-wp-cron/)? It’s also possible code contained within the site (plugin or theme) is preventing crons from functioning properly.

---

<div class="post-metadata">

**Author:** ![nemanjac](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/nemanjac/32/400_2.png) [@nemanjac](https://community.kinsta.com/u/nemanjac)\
**Post date:** [April 16, 2021, 10:36am UTC](https://community.kinsta.com/t/enabling-cron-job/599/3 "2021-04-16T10:36:04Z")

</div>

@Saravana_Kumar  
You can use WP-CLI for this from devkinsta\_fpm container.

Login to container shell using  
`#docker exec -it devkinsta_fpm bash`

After this navigate to your project directory  
`#cd /www/kinsta/public/[your-project-name]`  
and run  
`#wp cron event run --due-now --allow-root`

You will have to repeat this or use the watch command to run it every x seconds if you want that. But for development purposes running it manually it is not a big issue I think.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/8/80f8c4e56fecc02327a0964e6bf63a716483529f.png) [@system](https://community.kinsta.com/u/system)\
**Post date:** [April 30, 2021, 4:14pm UTC](https://community.kinsta.com/t/enabling-cron-job/599/4 "2021-04-30T16:14:07Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
