Questions tagged [cron]

Use it for questions about performing routine and other maintenance tasks in Drupal.

Filter by
Sorted by
Tagged with
1
vote
1answer
209 views

Sticky at top of lists node at certain time

I would like to sticky node at certain time and update time of publishing. I tried with module Scheduler but it unpublishes content I need published content it is more like republishing and put that ...
-2
votes
1answer
121 views

Process long query and output data to file

I have several nodes in my site (7822 at the moment) and I need to generate new data from those node values. I have a custom module with all the functions and calculations. The problem is that, ...
3
votes
1answer
86 views

Request a page - as admin - via command line to build up cache

Folks: I have a pretty hefty view page which has been overridden with template files to produce a custom gantt chart for a long list of users. For each row of gantt data - the outputted html is ...
2
votes
1answer
548 views

Creating custom cron jobs in the same module

I have Drupal 7 installation with Feed Import module enabled (not the same as Feeds module!). From this module I need to import data from several xml feeds with a different schedule. For example feed ...
1
vote
1answer
232 views

Can I set a cron for deleting and re-indexing Search API daily?

Using Commerce Kickstart 2. When we add new products, the facet search index does not re-index automatically as it says it does (Maybe because we are using some Aggregated Fields?) -Whatever-, we ...
1
vote
0answers
37 views

cron import more than 2 files with feeds

I'm on Drupal 7 using services and feeds. We have 10 XML files we're trying to upload during cron that doesn't work. If I do it manually by using wget/cURL via SSH only 2 files are uploaded. If I run ...
0
votes
1answer
98 views

Cron function set to run once per month not completing

I have a cron function that is being triggered but not completing. The function is supposed to run only once on the first of every month. The function runs but, I think, gets as far as comparing the $...
2
votes
1answer
206 views

How to reduce the delay in sending email notifications about new content?

I've set up a workflow rule to send an email to all users of a role when new content is saved. I've tested it with three test users and have noticed that the email takes quite a while to actually be ...
0
votes
1answer
31 views

Is it dangerous to call a function that deletes nodes based on criteria while a cron job is running that imports them

I have custom module that performs a dbquery on a button click that deletes nodes that fit a certain criteria. Is it dangerous that I also occasionally run a cron job that imports nodes that fit this ...
0
votes
1answer
46 views

Website encountered unexpected error - how to avoid?

I'm having that typical problem of Website encountered unexpected error popping up sometimes and then after repairing watchdog MySQL table it all works find again. My question is if there is a module ...
1
vote
1answer
512 views

Enabling Views module causing cron to fail

Quite simply, I enable the super common "Views" module, and on Save nothing but a white page happens. On a refresh (Where I agree to the form resubmission) the modules page comes back just fine. ...
0
votes
1answer
721 views

Drupal site is compromised by backdoor [duplicate]

My Drupal site has been compromised. Although I applied all modules updates and update my Drupal core to 7.35, it is still compromised. What would the next logical step to take be?
0
votes
0answers
38 views

Form action=“/cron.php”

I got a custom form in a block, wich is available on my homepage. After e while the form action changes to action="/cron.php" instead of action="/nl". I can't figure out where this fault is comming ...
3
votes
1answer
85 views

How to periodically deduct user points for flagged nodes?

I have a node which is published. And I have a global flag, which users have to mark to make nodes visible in Views. This is easy to do. But then I need to charge 40 user points for every day that ...
1
vote
1answer
239 views

Cron Run error for drush update script

I have created a script drup.sh to update the site with security issues and placed it in the sites/default dir. #!/bin/bash drush up drupal --security-only -y And on testing it by running bash drup....
0
votes
1answer
107 views

hook_cron_queue_info stopped

I'm trying to use Drupal Queue and Cron to execute a task. In the following example I: select all the users create an item in the queue for each of them define the function that has to be run for ...
0
votes
1answer
986 views

Drupal 7 not able to run cron after views/panels update

After an update of several modules to their latest versions (views, panels, ctools) it seems Drupal can no longer run cron, whether automatically or manual. It gives the error: "Cron run failed." I ...
1
vote
2answers
2k views

Drupal 8 cron not running from external source (as anonymous)

Running cron with crontab is not working on our Drupal 8 website if the user is anonymous. If I'm logged in as admin, I can run cron with the button or the url with key. If I'm not logged in, cron ...
0
votes
2answers
178 views

Node access, Cron, and DANGEROUS_ACCESS_CHECK_OPT_OUT'

Observations: Anonymous users can view nodes of a certain type Cron runs as an anonymous user Cron cannot access nodes of this type when using EntityFieldQuery Cron can access nodes of this type ...
1
vote
2answers
1k views

Is there a way to run a shell script on a custom cron?

I'm new to all this so maybe this isn't the best solution, but I've created a shell script cache warmer. wget --quiet http://www.example.com/custom-sitemap.xml --output-document - | egrep -o "http://...
5
votes
2answers
947 views

How does Drupal Cron effect Page Cache?

I'm trying to figure out how Drupal's cron effects the page cache of my site. It would be nice to store as many pages in the cache table as possible so that when requests are made they are being ...
1
vote
1answer
779 views

How do I configure cron in Drupal 6

In my GoDaddy control panel I have scheduled it to run this script every day: /web/cgi-bin/php5 "$HOME/html/my_site/cron.php However I cant figure out how I create tasks that will be run when cron....
1
vote
0answers
14 views

Cron not working [duplicate]

I have a hook_cron that regularly import contents from external site via drupal_http_request. However, I noticed that cron is not running. I am using Elysia cron module and I defined the job to run ...
1
vote
1answer
311 views

Advantages of running cron via drush rather than via curl?

Are there any major advantages of triggering Drupal's cron tasks via Drush rather than via a curl call to the site? The main thing I can think of is that no web server process would be needed, when ...
0
votes
1answer
235 views

CronJobs - I have two cron jobs but only one works

I have created 2 cron jobs on my server(ubuntu), but only one works. */5 * * * * curl -s http://www.example.com/cron.php?cron_key=TzVesnZuNqR4mkjv_LgBemUV-oYvsfYalyHOfDtL4cc */5 * * * * curl -s http:...
0
votes
0answers
53 views

Send SMS on X day

I have a calendar schedule and within that schedule I have some events. How can I send an SMS to the users on the event day minus some days(event_date - x days)? Thank you very much!
1
vote
0answers
463 views

Job for create/import data from csv

I need to import a large amount of contents of a CSV file. The file is a bit complex and still have a folder with a lot of images that are associated with each line of the csv. As the file is complex ...
0
votes
2answers
597 views

Export watchdog to CSV

I would like to export everything in the watchdog table to a CSV file occasionally using hook_cron(). I do not have access to PHPMyAdmin and don't want to waste time with modules like so. Right now, ...
0
votes
1answer
105 views

Add a module as cron job [duplicate]

I have a module file which fetch data from a link. I have to run this module as a cron everyday. How can I do it?
4
votes
3answers
2k views

Drupal 7 cron does not run civicrm Scheduled Jobs

I'm using Drupal 7, and set the cron job to run every hour. However, when drupal cron runs, my CiviCrm schedule jobs does not run. These schedule jobs run only when I click the link "run all ...
1
vote
3answers
3k views

Fatal error: Maximum execution time of 240 seconds exceeded in …database.inc on line 2171

I have a dilly of a pickle here. Not everytime, but frequently when I load any page Drupal 7 gets all of the contents of the page but then is still loading/spinning. After enough time goes by I get ...
0
votes
1answer
116 views

How to delegate iteration of custom Drupal 7 module to cron?

I have simple module that upon visiting its page 'mymodule' it first pulls the list of remote articles, and then starts iterating their urls to pull the content and to create Drupal 7 nodes. It works ...
1
vote
2answers
343 views

Scheduling a module to run at a specific time

Is there any way to schedule a particular sub-module to run at a specific time? I found hook_cron but it seems to rely on a scheduled cron job in crontab to run cron.php and then cron.php calls ...
1
vote
4answers
2k views

Get Instagram realtime count likes

Here is how the application is structured: A cronjob runs every 3 hours making the Instagram Recent Media call -https://api.instagram.com/v1/tags/myhashtag/media/recent?access_token=ACCESS-TOKEN If ...
0
votes
2answers
2k views

Execute Drupal function in background, maybe with cron, for the duration of a user session

It was too complicated description of the task, so let me edit it and simplify: I need a Drupal 7 function (data collection function) to be periodically triggered in the background but only a while a ...
1
vote
1answer
560 views

Updating all existing user's custom field

I am fairly new to Drupal development and ran into a problem when trying to create a cron to update the value on a custom field for all the existing users. Here is the code, when I click run cron it ...
1
vote
1answer
53 views

Is there a process to run a task daily

I have business logic that interfaces with Drupal entities (in this case, users), and we need to generate reports off these records daily at a preset time. It would be easy for me to generate this ...
1
vote
1answer
687 views

Stop send email attempt when cron is run

I just took over a drupal 7 site and when cron is run I get the follow error SMTP Error: Could not connect to SMTP host WD mail: Error sending e-mail (from ???????? to ???????) I know the previous ...
0
votes
1answer
23 views

Views Display for a query that doesn't display view content to user

I need a views display type that will not output content to the user. Essentially, I've got a view that simply performs a query, and I get the results of the query with views_get_view_result() and ...
1
vote
3answers
373 views

Creating node when cron runs [closed]

I'm a bit new to drupal and I have a task, where I have to create a node when cron runs. I set up the node like this in my custom module's cron hook: $node = new stdClass(); $node->type = '...
0
votes
0answers
127 views

Implement a Queue in Cron

I am trying to implement a Queue for my cron job, but some how it is not working. Following is the code snippet I have tried, but it is not working. function hook_cron() { watchdog('notice', 'Cron is ...
0
votes
1answer
1k views

Drupal CSV import and create nodes

I am trying to accomplish the following through feeds and want to know if this is possible. Setup a cron to pull a CSV file via ftp from another server daily Create a bunch of nodes with custom ...
0
votes
1answer
105 views

how to setup cron to run everytime when new file is generated in drupal files folder

I created webform and saving submitted data into text file in drupal files folder. A remote script performs calculations and outputs new text file to the same folder . I want cron to run everytime ...
0
votes
1answer
233 views

Does performing $entity->save() on field collection programmatically clears the page cache of it's node host?

I am using $entity->save() on a custom hook_cron that runs every minute. Does anyone knows if by doing $entity->save() , Drupal will clear the page cache of the nodes/views/panels housing it?
1
vote
2answers
1k views

set specific time to cron for specific php script

Actually i want all unpublish nodes to be delete automatically whose created date is 2 days ago. I can write php script for that and also include that code in hook_cron api. but i am confused that my ...
1
vote
1answer
725 views

Scheduler module not working even after cron run

Installed 'Scheduler module' and try to publish a content on specific time. But it seems like it is not working. I tried with 'Run cron manually' also, But it doesn't ,While trying with Scheduler ...
0
votes
0answers
419 views

How to automatically put your site into maintenance mode if at least a critical security update is available?

I think I'm craving for this functionality. What I want is, if after a CRON run, Drupal detects that such a security update is available, the site would be taken down for maintenance mode to avoid ...
1
vote
0answers
657 views

Drupal Queue is not processing with hook cron

All my code is here, the queues are created in backoffice, but the action in the worker call back is never processed. ! I lean the node creation in my function inalco_publications_queue_worker is ...
1
vote
2answers
1k views

Safe to delete cache_form table while site is in maintenance mode?

My site has a very large database of 100MB, most of this is in a table called cache_form. I've tried clearing the cache. When I try and run the cron I just get a white screen. My site is in ...
0
votes
3answers
2k views

Drupal System cron temporary file/folder error

I have very specific problem which I can't resolve. Thing is, I've created few files with function that creates temporary files and then system cron after running should delete them. Problem that I ...

1
3 4
5
6 7
9