# Manual execution of cron tasks are working but not from crontab

**URL:** <https://forum.mautic.org/t/manual-execution-of-cron-tasks-are-working-but-not-from-crontab/24738>\
**Category:** Product Support\
**Tags:** community, discussion\
**Created:** [July 12, 2022, 10:27am UTC](https://forum.mautic.org/t/manual-execution-of-cron-tasks-are-working-but-not-from-crontab/24738 "2022-07-12T10:27:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anil\_naut111](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/anil_naut111/32/6472_2.png) [@anil\_naut111](https://forum.mautic.org/u/anil_naut111)\
**Post date:** [July 12, 2022, 10:27am UTC](https://forum.mautic.org/t/manual-execution-of-cron-tasks-are-working-but-not-from-crontab/24738/1 "2022-07-12T10:27:54Z")

</div>

Manual execution of cron-tasks are working, but not from crontab. Please suggest.  
**Your software**  
My Mautic version is: v4.2.1  
My PHP version is: 7.4.29  
My Database type and version is: MySQL 5.7

Output when I run segment update manually:

```auto
Rebuilding contacts for segment 4
4 total contact(s) to be added in batches of 300
 4/4 [============================] 100%
0 total contact(s) to be removed in batches of 300
4 contact(s) affected
Rebuilding contacts for segment 2
0 total contact(s) to be added in batches of 300
0 total contact(s) to be removed in batches of 300
0 contact(s) affected
Rebuilding contacts for segment 1
0 total contact(s) to be added in batches of 300
0 total contact(s) to be removed in batches of 300
0 contact(s) affected
Rebuilding contacts for segment 5
0 total contact(s) to be added in batches of 300
0 total contact(s) to be removed in batches of 300
0 contact(s) affected
Rebuilding contacts for segment 6
189465 total contact(s) to be added in batches of 300
  23987/189465 [===>------------------------] 12%

```

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [July 12, 2022, 2:23pm UTC](https://forum.mautic.org/t/manual-execution-of-cron-tasks-are-working-but-not-from-crontab/24738/2 "2022-07-12T14:23:13Z")

</div>

Could be an issue with your crontab

Try a different command something simple like `mkdir testcrontab` to see if crontab is working or not for sure.

---

<div class="post-metadata">

**Author:** ![anil\_naut111](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/anil_naut111/32/6472_2.png) [@anil\_naut111](https://forum.mautic.org/u/anil_naut111)\
**Post date:** [July 14, 2022, 10:06am UTC](https://forum.mautic.org/t/manual-execution-of-cron-tasks-are-working-but-not-from-crontab/24738/3 "2022-07-14T10:06:48Z")

</div>

Yes it helps cron was not working, I had fixed.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [April 23, 2023, 3:07am UTC](https://forum.mautic.org/t/manual-execution-of-cron-tasks-are-working-but-not-from-crontab/24738/4 "2023-04-23T03:07:18Z")

</div>

Closed on April 23, 2023, 3:07am UTC

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