# Version 1.1 Cron Jobs

**URL:** <https://forum.mautic.org/t/version-1-1-cron-jobs/1920>\
**Category:** Product Support\
**Created:** [June 8, 2015, 2:55pm UTC](https://forum.mautic.org/t/version-1-1-cron-jobs/1920 "2015-06-08T14:55:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wbuist](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/wbuist/32/21_2.png) [@wbuist](https://forum.mautic.org/u/wbuist)\
**Post date:** [June 8, 2015, 2:55pm UTC](https://forum.mautic.org/t/version-1-1-cron-jobs/1920/1 "2015-06-08T14:55:28Z")

</div>

The Campaign cron job to add people in a lead list to a campaign has stopped working since the upgrade… For me anyway.  
  
  
  
Running it via a secure shell this is the messaging I get… (It’s correctly identifying 5 people to add, but doesn’t add them…)  
  
  
  
Rebuilding leads for campaign 8  
  
  
  
Warning: date\_default\_timezone\_get(): It is not safe to rely on the system’s timezone settings. You are _required_ to use the date.timezone setting or the date\_default\_timezone\_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Europe/London’ for ‘BST/1.0/DST’ instead in /var/sites/a/abelard-uk.com/public\_html/m/app/bundles/CoreBundle/Helper/DateTimeHelper.php on line 68  
  
  
  
Warning: date\_default\_timezone\_get(): It is not safe to rely on the system’s timezone settings. You are _required_ to use the date.timezone setting or the date\_default\_timezone\_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Europe/London’ for ‘BST/1.0/DST’ instead in /var/sites/a/abelard-uk.com/public\_html/m/app/bundles/CoreBundle/Helper/DateTimeHelper.php on line 77  
  
5 total lead(s) to be added in batches of 300  
  
0/5 [\>---------------------------] 0%  
  
  
  
  
  
[Exception]  
  
DateTime::\_\_construct(): It is not safe to rely on the system’s timezone settings. You are _required_ to use the date.timezone setting or the date\_default\_timezone\_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Europe/London’ for ‘BST/1.0/DST’ instead  
  
  
  
mautic:campaigns:update [-l|–batch-limit[="…"]] [-m|–max-leads[="…"]] [-i|–campaign-id[="…"]] [-f|–force]  
  
  
  
  
  
Any ideas?

---

<div class="post-metadata">

**Author:** ![wbuist](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/wbuist/32/21_2.png) [@wbuist](https://forum.mautic.org/u/wbuist)\
**Post date:** [June 8, 2015, 2:55pm UTC](https://forum.mautic.org/t/version-1-1-cron-jobs/1920/2 "2015-06-08T14:55:28Z")

</div>

The Campaign cron job to add people in a lead list to a campaign has stopped working since the upgrade… For me anyway.

Running it via a secure shell this is the messaging I get… (It’s correctly identifying 5 people to add, but doesn’t add them…)

Rebuilding leads for campaign 8

Warning: date\_default\_timezone\_get(): It is not safe to rely on the system’s timezone settings. You are _required_ to use the date.timezone setting or the date\_default\_timezone\_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Europe/London’ for ‘BST/1.0/DST’ instead in /var/sites/a/abelard-uk.com/public\_html/m/app/bundles/CoreBundle/Helper/DateTimeHelper.php on line 68

Warning: date\_default\_timezone\_get(): It is not safe to rely on the system’s timezone settings. You are _required_ to use the date.timezone setting or the date\_default\_timezone\_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Europe/London’ for ‘BST/1.0/DST’ instead in /var/sites/a/abelard-uk.com/public\_html/m/app/bundles/CoreBundle/Helper/DateTimeHelper.php on line 77  
5 total lead(s) to be added in batches of 300  
0/5 [\>---------------------------] 0%

[Exception]  
DateTime::\_\_construct(): It is not safe to rely on the system’s timezone settings. You are _required_ to use the date.timezone setting or the date\_default\_timezone\_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Europe/London’ for ‘BST/1.0/DST’ instead

mautic:campaigns:update [-l|–batch-limit[="…"]] [-m|–max-leads[="…"]] [-i|–campaign-id[="…"]] [-f|–force]

Any ideas?

---

<div class="post-metadata">

**Author:** ![wbuist](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/wbuist/32/21_2.png) [@wbuist](https://forum.mautic.org/u/wbuist)\
**Post date:** [June 8, 2015, 2:59pm UTC](https://forum.mautic.org/t/version-1-1-cron-jobs/1920/3 "2015-06-08T14:59:20Z")

</div>

The mail cron job also reports an error…

/usr/bin/php-5.4 [path to my site]/app/console mautic:email:process --env=prod

[SymfonyComponentDependencyInjectionExceptionServiceNotFoundException]  
You have requested a non-existent service “swiftmailer.transport.real”.

mautic:send:emails [–message-limit[="…"]] [–time-limit[="…"]] [–do-not-clear] [–recover-timeout[="…"]] [–clear-timeout[="…"]]

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [June 8, 2015, 3:25pm UTC](https://forum.mautic.org/t/version-1-1-cron-jobs/1920/4 "2015-06-08T15:25:36Z")

</div>

@wbuist,

For the date time issue, you may need to set a date.timezone in your php.ini. Or you could try adding `date_default_timezone_set (‘UTC’);` to the top of app/console after the \<?php tag. If adding that code works, we can look at adding that to the core for the next release. We do something similar when accessing through the web but doesn’t like we set it for the console script.

For the mail cron, do you have email set in the configuration to be queued or to send immediately? If sending immediately, you do not need that cron job.

Thanks!  
Alan

---

<div class="post-metadata">

**Author:** ![wbuist](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/wbuist/32/21_2.png) [@wbuist](https://forum.mautic.org/u/wbuist)\
**Post date:** [June 8, 2015, 4:20pm UTC](https://forum.mautic.org/t/version-1-1-cron-jobs/1920/5 "2015-06-08T16:20:54Z")

</div>

Thanks Alan, I added that code and the errors are resolved on that cron job, thanks -

You are right about the other one. Sorry for the confusion.

---

<div class="post-metadata">

**Author:** ![wbuist](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/wbuist/32/21_2.png) [@wbuist](https://forum.mautic.org/u/wbuist)\
**Post date:** [June 8, 2015, 4:32pm UTC](https://forum.mautic.org/t/version-1-1-cron-jobs/1920/6 "2015-06-08T16:32:54Z")

</div>

So, I’ve flicked back to queue and the cron job runs but with a fatal error -

Fatal error: Call to a member function getTranslator() on a non-object in [path to site]/app/bundles/CoreBundle/Swiftmailer/Transport/MandrillTransport.php on line 74

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:59pm UTC](https://forum.mautic.org/t/version-1-1-cron-jobs/1920/7 "2020-02-02T22:59:33Z")

</div>


