# How to test a campaign

**URL:** <https://forum.mautic.org/t/how-to-test-a-campaign/28604>\
**Category:** Product Support\
**Created:** [July 14, 2023, 6:02am UTC](https://forum.mautic.org/t/how-to-test-a-campaign/28604 "2023-07-14T06:02:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![wph524](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@wph524](https://forum.mautic.org/u/wph524)\
**Post date:** [July 14, 2023, 6:02am UTC](https://forum.mautic.org/t/how-to-test-a-campaign/28604/1 "2023-07-14T06:02:38Z")

</div>

**Your software**  
My Mautic version is: 4.4.9  
My PHP version is:8.0.29  
My Database type and version is:mysql 8.0.27

**Your problem**  
My problem is:  
How should I test my Mautic campaign?  
These errors are showing in the log:

Steps I have tried to fix the problem:  
I tried to use the campaign builder and set that the contacts in a segment will be added to start the campaign. I added one contact to the segment and nothing happened. What shall I do?

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 14, 2023, 6:08am UTC](https://forum.mautic.org/t/how-to-test-a-campaign/28604/2 "2023-07-14T06:08:13Z")

</div>

Hi,

Have you made sure that you have cron jobs running?

I am not sure how you did your install, but if you did it manually you need to make sure you have the following two crons setup to run campaigns:  
php /var/www/mautic/bin/console mautic:campaigns:update  
php /var/www/mautic/bin/console Mautic:campaigns:trigger

Depending on the interval that these are set up so your campaign will be updated and fired. Also make sure your campaign is published.

---

<div class="post-metadata">

**Author:** ![wph524](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@wph524](https://forum.mautic.org/u/wph524)\
**Post date:** [July 14, 2023, 6:10am UTC](https://forum.mautic.org/t/how-to-test-a-campaign/28604/3 "2023-07-14T06:10:29Z")

</div>

There is an error.  
Could not open input file: /var/www/mautic/bin/console

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [July 14, 2023, 6:53am UTC](https://forum.mautic.org/t/how-to-test-a-campaign/28604/4 "2023-07-14T06:53:53Z")

</div>

How did you do your Mautic install? Do you have access to your terminal

---

<div class="post-metadata">

**Author:** ![wph524](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@wph524](https://forum.mautic.org/u/wph524)\
**Post date:** [July 14, 2023, 6:55am UTC](https://forum.mautic.org/t/how-to-test-a-campaign/28604/5 "2023-07-14T06:55:52Z")

</div>

I installed my Mautic by GitHub.  
I used my terminal in the folder of Mautic.

---

<div class="post-metadata">

**Author:** ![astrylis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/astrylis/32/6421_2.png) [@astrylis](https://forum.mautic.org/u/astrylis)\
**Post date:** [July 14, 2023, 9:44am UTC](https://forum.mautic.org/t/how-to-test-a-campaign/28604/6 "2023-07-14T09:44:13Z")

</div>

Hey wph524

you should be running these from the /var/www/mautic directory as typed below, you can run these manually if needed on the server without using your crontab.

php bin/console mautic:campaigns:update

then run  
php bin/console mautic:campaigns:trigger

you should be able to find any logs in the /var/www/mautic/var/logs directory and the files are date stamped

---

<div class="post-metadata">

**Author:** ![wph524](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@wph524](https://forum.mautic.org/u/wph524)\
**Post date:** [July 16, 2023, 12:11pm UTC](https://forum.mautic.org/t/how-to-test-a-campaign/28604/7 "2023-07-16T12:11:18Z")

</div>

> [@astrylis](#):
>
> php bin/console mautic:campaigns:update

Fatal error: Uncaught Error: Failed opening required ‘/Users/peihao-wu/mautic/vendor/autoload.php’ (include\_path=‘.:/opt/homebrew/Cellar/php@8.0/8.0.29\_1/share/php@8.0/pear’) in /Users/peihao-wu/mautic/autoload.php:3

Stack trace:

#0 /Users/peihao-wu/mautic/bin/console(7): require\_once()

#1 {main}

thrown in /Users/peihao-wu/mautic/autoload.php on line 3

---

<div class="post-metadata">

**Author:** ![astrylis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/astrylis/32/6421_2.png) [@astrylis](https://forum.mautic.org/u/astrylis)\
**Post date:** [July 17, 2023, 1:40pm UTC](https://forum.mautic.org/t/how-to-test-a-campaign/28604/8 "2023-07-17T13:40:06Z")

</div>

did you run composer install when you installed mautic?

Also are you running this locally on your machine or have you a server?
