Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tasks]

The tag has no usage guidance.

0
votes
0answers
25 views

Updating asset indexes doesn't work

I have a page where updating the asset indexes is not working. If I hit «Update asset indexes» The loading animation shows and never stops the animation. Installed AsyncQueue = Same effect Increased ...
1
vote
1answer
25 views

Lowering memory usage on task batches

I build a plugin for Craft 2 which imports data from an excel file into craft commerce products. The problem is that it needs to import excels with like 10.0000 rows and 30 columns. I made a simple ...
0
votes
1answer
82 views

Webhook plugin & hooking into Contact Form

As my first delve into webhooks I've just installed the Pixel&Tonic Webhooks plugin. I'm trying to send data from a front end contact form to Zapier. The front end form uses the Pixel&Tonic ...
1
vote
1answer
23 views

Tasks runs only after admin is logged in

I have a plugin which runs a task on order complete. The tasks runs successfully without any errors. But the problem is the task is only completed when admin is logged in. So if someone has completed ...
3
votes
3answers
338 views

Tons of Deleting Stale Template caches

My task queue (is that what it's called?) is filled with literally hundreds of "Deleting Stale Template Caches" and every day there seem to be new ones. Along there are also resaving entries tasks and ...
3
votes
1answer
335 views

How to manually run pending tasks in Craft CMS 3

I have a task that I want to run, but unfortunately I dont seem to be able to disable mod_gzip/mod_deflate on this server, so that task will not run in the background and causes the site to hang while ...
1
vote
0answers
31 views

Subclassing BaseTask Class

I am trying to create a Sub Task with Craft 2 that uses a task class. I have created some generic code to explain my setup: Parent Task Class: <?php namespace Craft; class ...
1
vote
1answer
30 views

How to prevent “Failed” errors in job scheduler in Craft CMS 3?

I have an instance of BaseJob that I occasionally queue up that involves reading an XML file from another server. However, requests to that server are rate-limited, and so occasionally it will fail ...
2
votes
1answer
199 views

Queue Exec Time

Please see the attached screenshot. On heavy tasks the queue is cancelled. Where do I set the timeout or remove it completely?
0
votes
0answers
20 views

Strange behavior with Re-saving Events entries task

I have an odd issue with re-saving entries. I have a structure where I have 3 levels. There are 3 top level parent entries. If I change the Entry Url Format. It changes 2 of the parent entries and ...
1
vote
3answers
1k views

How can I troubleshoot why my queue of tasks in stuck in CraftCMS 3?

I have a series of tasks lined up in the queue to run but they are just marking one as in progress and then sitting there and not executing. I have tried updating the DB table "queue" by doing the ...
1
vote
1answer
56 views

Why when a task is marked as “Stalled” the following tasks can't automatically processed?

This is annoying to have to click on “Try again” to unlock the queued tasks. This could leads to dozen and dozen of stucked tasks that usually could be processed without any problem (like the ...
1
vote
1answer
71 views

Deleting oldest 404 redirects task stalling

I have a site which has 100's of pending "Deleting oldest 404 redirects" tasks and they keep stalling so the list isn't clearing. The client has added lots of custom rules to the .htaccess which I ...
1
vote
1answer
41 views

Craft ordering tags by 'name'

I've got a problem with some tasks. Craft tells me 'Deleting Stale Template Caches Failed' multiple times. When I look in the Deprecated Warnings, it tells me two things: Ordering tags by ‘name’ has ...
1
vote
1answer
157 views

Craft task send mails at specific date

I already learned how to create a task from this page but I would like to know how to run this task? I'm creating a portal where users are allowed to give their votes and discuss several projects. ...
3
votes
0answers
229 views

Task “Resaving all localizable elements” is stuck when adding new new locale

I'm trying to add a new locale, but the task "Resaving all localizable elements" is stuck and the new locale is not being added to content. Even after restarting the task. There are no errors in the ...
2
votes
1answer
286 views

Failed Task and various errors in logs

I've got a few issues with a site but I'll try to separate in case they're not related. Firstly I keep getting "Failed task - Deleting stale template caches". I've looked in the logs and some ...
3
votes
2answers
352 views

GeneratePendingTransforms stuck every time

I get a stuck GeneratePendingTransforms task over and over again. In the first place, I don't know why any transforms are getting created at that point. By now, almost every image transform for every ...
1
vote
1answer
44 views

How do I hide notifications about running tasks?

I installed Import. I tried to run a test import and it froze. Now the pop-up status that appears in Craft's menu - just below Settings - will not disappear. I even uninstalled the plugin. But, ...
2
votes
1answer
67 views

Is it possible to determine if a script is running within a task?

I have a chunk of PHP code which should not be run if the script is being executed from a task. We already have these methods, which are similar to what I'm looking for: craft()->isConsole() - ...
3
votes
1answer
785 views

Generating pending image transforms stuck

My image transform task always gets stuck halfway through so that I have to "repair" the task as per this guide. Im trying to convert about 150 images (amounts to ~300 steps). Resetting the task ...
2
votes
1answer
311 views

Tasks either don't start or don't run as background processes

I'm using Laravel Valet for my Craft development environment (which is awesome, btw) except for an issue with Tasks not kicking off. I initially stumbled upon the problem while using the Import plugin....
0
votes
1answer
569 views

Stalled / Stuck Task (GeneratePendingTransforms) [duplicate]

I’ve got a task running called “GeneratePendingTransforms”, but it seems to stop/get stuck just over 65% of the way through and never completes. Is there anything that could cause this I’ve got Task ...
1
vote
1answer
780 views

Delete Stale Template Caches tasks much larger in Production than Staging

I've been running into issues where the Delete Stale Template Caches tasks on my Production environment are running up to 20x longer than on my identical Staging environment. The config/environment ...
1
vote
1answer
134 views

How to notify the user from a Task

Is it possible to somehow notify the user from a completing task? I am walking trough a set of .csv files and on completion i would like to notify the user. // last step $stepIndex = $step + 1; if ( $...
1
vote
1answer
82 views

How can I access or set a Task's properties inside a class or method?

How am I able to get or set additional properties on a Task model inside a plugin. Eventually I would like to influence the Totalsteps of a task. $task = craft()->tasks->createTask('Reroute', '...
1
vote
1answer
311 views

Memory usage in sub tasks vs. regular tasks

I'm currently implementing a task-based application, which pulls some data from an external API before creating a number of entries based on the payload. After creating the entries, the app will need ...
3
votes
1answer
460 views

Error: Variable 'entry' does not exist - When adding homepage or other entry with URL

I have an existing Craft Pro installation (v2.5.2757) that I'm using to drive an application. The current install does not have a homepage or any entry associated with a URL. All requests are being ...
3
votes
2answers
1k views

Resolving “Stuck” Background Tasks

Hi guys so I am having an issue with the "generating pending image transforms" being stuck. I've seen the solution listed here https://craftcms.com/support/stuck-tasks telling me to go to the ...
2
votes
3answers
996 views

Debugging a Failed Custom Task in Craft CMS

I am trying to debug a failed task in craft. However I'm not really sure what I'm looking for. I've dug though the log files and found traces of the task but no real errors to speak of. I have set: ...
0
votes
1answer
179 views

DeleteStaleTemplateCaches/tasks error

I've got the ol’ DeleteStaleTemplateCaches issue breaking the Craft task manager/process. I've tried switching the offending task over to error from running but is still stuck. Any thoughts on ...
1
vote
1answer
646 views

Possible memory leak - GeneratePendingTransforms/ImageMagick

Wondering if anyone else has had issues with memory and a large amount of image transforms. I seems like perhaps memory is not being freed up between transforms. When GeneratePendingTransforms is ...
4
votes
1answer
619 views

Recurring Scheduled Tasks in Craft

Is it possible to have a task (defined in a plugin) be scheduled in Craft to run on a recurring basis without having to use cron? If so, where do I put those settings (eg, to run a task hourly)?
3
votes
1answer
222 views

Tasks on Uninstall Plugin

When I try to initiate tasks on uninstall the tasks fail because the plugin completes uninstalling before the tasks. The task is referencing an uninstalled plugin at that point. Once the plugin is ...
1
vote
1answer
237 views

Entry saving in task fails due to required assets/matrix fields being read as blank, even through they are not

I have a task that is used to collate relationship data for a specific entry and save it as JSON to a text field in that entry. Everything is working fine, except for the saving of the entry which ...
1
vote
1answer
104 views

Implication of old task backlog suddenly being released

I have a Craft website that has become quite big with several dozen sections and many templates - my first bigish Craft site - being a local government one with more than a thousand pages, forms and ...
4
votes
1answer
508 views

How can I mitigate caching performance issues with Craft?

I ran into problems with the performance of one of our Craft sites. This showed up as: MySQL running out of memory and crashing, because Apache was using up all the memory in backgrounds tasks, ...
2
votes
1answer
894 views

Problems with tasks and max execution time

We've set up a task that's supposed to run through an external folder with images and resize them into 3 sizes each. This results in about 13000 tasks (one task per image). I thought each task was on ...
1
vote
1answer
133 views

Detect task is finished

Is there a way to detect when a task is finished with js, for example I have a task running I can see the progress bar in the top right corner I would like to attach an event so when the task is done ...
1
vote
0answers
426 views

Debugging Validation Errors In Craft

Is it obvious why the task validation errors are not getting output in my log: public function runStep($step) { try { $entry = craft()->entries->getEntryById($this->_entryIds[...
1
vote
1answer
323 views

Task Validation Debugging

I am having issues debugging craft tasks where the issue is caused by validation errors rather than php syntax / environment issues. How do you debug validation errors in craft tasks?
2
votes
1answer
301 views

Trigger Task Status Icon

I have a plugin that starts a task and subtasks from a CP widget AJAX call. The tasks are running without a hitch, but for some reason on production, the icon does not appear when the tasks start ...
8
votes
1answer
2k views

Documentation on creating tasks

I'm looking to integrate tasks into a plugin I'm building. Whilst I know that the Craft documentation shows the Tasks Service/Model properties/methods in the full class reference, I can't find ...
1
vote
1answer
351 views

Creating Task cause Site/CP to hang

I have created a simple task to automatically create some entries if they don't exist and this all works fine. The only issue I am having is that if the task is still running and I try and load a ...
1
vote
1answer
139 views

How to re-generate titles for all entries in a section?

Having changed the format of a Dynamic Entry Title, how do I get Craft to re-generate them all? I thought a background task would take care of it but nothing happens.
25
votes
1answer
4k views

Generating pending image transforms stuck in process

In the CMS the progress indicator for tasks is stuck and not completing its jobs. What can I do to resolve this?
3
votes
1answer
2k views

Long 'Deleting stale template caches'

Is it common to have a (near)constantly running 'Deleting stale template caches' task ongoing? I commonly log in to see a task still pending several hours after the last change to the site was made, ...
2
votes
1answer
838 views

My tasks don't seem to be running as a background process

I have my plugin working now so that I can email users who's accounts will expire in 7 days time. The users are being selected correctly and the emails are being sent as expected. However, the tasks ...
7
votes
5answers
3k views

Triggering the start of a task from a CRON job

I have a site setup which is for subscribers only. I have added a user expiry date field to the users section and everything is working perfectly on the front end in that I can restrict access to ...
2
votes
1answer
137 views

How to get a Task's description inside runStep()?

I know that I can get the default description of a Task with: $this->description; //or $this->getDescription(); But how can I get the description if it got changed on creation: craft()->...