# Unable to create task

**URL:** <https://forum.communityhealthtoolkit.org/t/unable-to-create-task/2929>\
**Category:** Development\
**Tags:** tasks\
**Created:** [July 21, 2023, 9:18am UTC](https://forum.communityhealthtoolkit.org/t/unable-to-create-task/2929 "2023-07-21T09:18:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![durga.tukilogic](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/durga.tukilogic/32/2632_2.png) [@durga.tukilogic](https://forum.communityhealthtoolkit.org/u/durga.tukilogic)\
**Post date:** [July 21, 2023, 9:18am UTC](https://forum.communityhealthtoolkit.org/t/unable-to-create-task/2929/1 "2023-07-21T09:18:26Z")

</div>

I have created a form name covidform and on task.js i have written some code for that code to show but i am unable to see that task for person anywhere in my app. The code on tasks.js as follows:

`module.exports = [{ name: 'covidTest', title: 'contact.type.person', icon: 'icon-healthcare', appliesTo: 'contacts', appliesToType: ['person'], actions: [{ form: 'covidform' }], events: [{ start: 7, days: 7, end: 0, }], }]; `

---

<div class="post-metadata">

**Author:** ![jkuester](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/jkuester/32/806_2.png) [@jkuester](https://forum.communityhealthtoolkit.org/u/jkuester)\
**Post date:** [July 21, 2023, 1:54pm UTC](https://forum.communityhealthtoolkit.org/t/unable-to-create-task/2929/2 "2023-07-21T13:54:43Z")

</div>

Unless I am missing something, with this configuration I would expect a task to be displayed for each person _that has been created in the last `7` days_. The `events.days` value is based on the [contact’s creation date](https://docs.communityhealthtoolkit.org/apps/guides/tasks/task-schema-parameters/#appliesto-contacts) when no `dueDate` is specified. Is this your desired behavior? If you create a new person, do you see a task generated for that person?

---

<div class="post-metadata">

**Author:** ![durga.tukilogic](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/durga.tukilogic/32/2632_2.png) [@durga.tukilogic](https://forum.communityhealthtoolkit.org/u/durga.tukilogic)\
**Post date:** [July 24, 2023, 7:40am UTC](https://forum.communityhealthtoolkit.org/t/unable-to-create-task/2929/3 "2023-07-24T07:40:40Z")

</div>

I just want to know more about the task and tried to create simple task for that and I have created a new person to check the task but still there is no task generated for that person .

---

<div class="post-metadata">

**Author:** ![niraj](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/niraj/32/1330_2.png) [@niraj](https://forum.communityhealthtoolkit.org/u/niraj)\
**Post date:** [July 25, 2023, 12:30pm UTC](https://forum.communityhealthtoolkit.org/t/unable-to-create-task/2929/4 "2023-07-25T12:30:44Z")

</div>

Hi @durga.tukilogic ,

I am assuming you are working on your local instance and have already [uploaded the task](https://docs.communityhealthtoolkit.org/apps/tutorials/tasks-1/#2-uploading-the-task) using the commands something like below:

```auto
cht --url=https://<username>:<password>@localhost --accept-self-signed-certs

```

or

```auto
cht --url=https://<username>:<password>@localhost --accept-self-signed-certs compile-app-settings upload-app-settings

```

Are you getting any error messages? If not, could you please try testing task using harness methods as described in [documentation](https://docs.communityhealthtoolkit.org/apps/tutorials/application-tests/#testing-tasks)? Please let us know how it goes.
