# How we can set ENV for Task in v9 like we used to do in v8

**URL:** https://forums.concretecms.org/t/how-we-can-set-env-for-task-in-v9-like-we-used-to-do-in-v8/4888
**Category:** Developing with Concrete
**Created:** [January 23, 2023, 5:19am UTC](https://forums.concretecms.org/t/how-we-can-set-env-for-task-in-v9-like-we-used-to-do-in-v8/4888 "2023-01-23T05:19:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![katz515](https://forums.concretecms.org/user_avatar/forums.concretecms.org/katz515/32/4325_2.png) [@katz515](https://forums.concretecms.org/u/katz515)
#### Post date: [January 23, 2023, 5:19am UTC](https://forums.concretecms.org/t/how-we-can-set-env-for-task-in-v9-like-we-used-to-do-in-v8/4888/1 "2023-01-23T05:19:09Z")

</div>

How can we set to run task with specific `--env` parameters, or v9 doesn’t have a capability?

In v8, we have multi server environment that we separate admin & editor users and public users. (e.g., we have two environment set as `prod-admin` and `prod-app`

Then, when we run the automated job, we run from admin CMS server with --env parameter. So that it won’t eat too much user’s end server resources.

V9 doesn’t have the capability yet?

---

<div class="post-metadata">

### Author: ![Korvin](https://forums.concretecms.org/user_avatar/forums.concretecms.org/korvin/32/3900_2.png) [@Korvin](https://forums.concretecms.org/u/Korvin)
#### Post date: [January 25, 2023, 12:41am UTC](https://forums.concretecms.org/t/how-we-can-set-env-for-task-in-v9-like-we-used-to-do-in-v8/4888/2 "2023-01-25T00:41:29Z")

</div>

Environment variables get pulled into the runtime when you run a command from the CLI. You can provide environment variables either by `export`ing them before running the CLI command or by specifying them inline with the command.

For us, when we have a webroot that powers more than one site and we want to target the proper site environment, we just specify it inline:

```bash
CONCRETE5_ENV=the_specific_env ./vendor/bin/concrete5 ...

```

---

<div class="post-metadata">

### Author: ![katz515](https://forums.concretecms.org/user_avatar/forums.concretecms.org/katz515/32/4325_2.png) [@katz515](https://forums.concretecms.org/u/katz515)
#### Post date: [January 25, 2023, 3:40am UTC](https://forums.concretecms.org/t/how-we-can-set-env-for-task-in-v9-like-we-used-to-do-in-v8/4888/3 "2023-01-25T03:40:17Z")

</div>

Thx @Korvin

Ahh I understand…  
Cool. I think I can make a good use of it at the most cases.

We have few clients which we need to set different variable.

Some cron job is set for admin environment, but other is set for production (user-end) environment.

At the most cases, we could just modify with the job code when updating to task.

Thanks.
