# Command line with cron

**URL:** https://discourse.getcockpit.com/t/command-line-with-cron/1519
**Category:** Support
**Created:** [June 21, 2020, 8:59am UTC](https://discourse.getcockpit.com/t/command-line-with-cron/1519 "2020-06-21T08:59:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nouscovid19](https://avatars.discourse-cdn.com/v4/letter/n/74df32/32.png) [@nouscovid19](https://discourse.getcockpit.com/u/nouscovid19)
#### Post date: [June 21, 2020, 8:59am UTC](https://discourse.getcockpit.com/t/command-line-with-cron/1519/1 "2020-06-21T08:59:53Z")

</div>

how to launch the command line “./cp export” with cron

---

<div class="post-metadata">

### Author: ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)
#### Post date: [June 22, 2020, 11:45am UTC](https://discourse.getcockpit.com/t/command-line-with-cron/1519/2 "2020-06-22T11:45:34Z")

</div>

I guess, that the cron doesn’t know about the php path. Try `php /path/to/cockpit/cp export` instead, so crontab knows about executing the php interpreter.

If this doesn’t work, maybe you have to `cd` into your docs root first, so `cd /path/to/cockpit && php cp export` should work.
