Questions tagged [cron]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
87 views

How to prevent that import with Feeds and Elysia cron gets stuck

I have several Feeds which are called by Elysia cron. The feeds are called at a given time, and later the last two feeds are called each 2 minutes, because it was the only way of preventing them from ...
0
votes
1answer
490 views

how to run cron hook after a week [duplicate]

i have created a module to hook Drupal cron system and the function in my module is being executed on every cron run, which is perfect. I need this hooked cron function to run only once weekly ...
1
vote
1answer
315 views

How to force a cron run after a Rules component is scheduled?

This question is a sequel on Why is the database not updated before a next Rule is launched?. I have a Rule that schedules a Rules component 5 seconds after the current time (this number is ...
0
votes
1answer
842 views

How to manage by cron a long-running queue of very many items

I'm creating a File Checker module that verifies files managed by Drupal actually exist at the uri where Drupal believes they are. It places an item in a queue for each file entity. As there could be ...
1
vote
1answer
406 views

Downloading, and loading Google analytics script locally and daily with Drupal Cron

I'm using Drupal Google Analytics module for some time; It works perfectly and gives me the data I need. Yet, since instilling it, I get the following notification on Google Pagespeed Insights: Do ...
0
votes
1answer
488 views

Scheduler Module unpublish content

Trying to schedule a content type to be unpublished on a specific date. Using the scheduler module everything is set up seemingly correct. When I run Cron the update fails, Updater Content - ...
1
vote
3answers
4k views

How to check if an item exists in a Queue?

While inserting items in a Queue how can I check if the item I am trying to insert is already present in the Queue?
0
votes
2answers
125 views

How to use cache set and get to store time cron ran?

We have a new requirement where we need to run a job on a daily basis. We have setup cron to run every 1 hour. The goal is to have cron ron every 1 hour, but we want a specific job to run only if 1 ...
0
votes
1answer
100 views

Cron not working when called from SSH php curl - Elysia cron module activated

I have Elysia cron module activated, with some cron task scheduled. I have a crontab pointing to an sh every */2 minutes. The sh executes a php with a curl call to cron.php?cron_key=CRON-KEY. It was ...
0
votes
2answers
2k views

Execute cron job automatically after a specific interval of time in windows

I've created a custom module in drupal and implemented hook_cron. My hook is working perfectly, when I click on run cron button from admin interface. How can I automatically execute my hook after a ...
1
vote
1answer
109 views

How to write a drupal cron job to fetch data from a link [closed]

How can I write drupal cron job that fetches data from a link and update the database ..? Im new to drupal so unable to understand the working of cron after searching alot. Any help will be ...
1
vote
1answer
194 views

How do I create a variable to check last time hook_cron() implemented from a custom module was ran?

We have a custom module for which we need to run on a daily basis. I am not sure it is working, as I am unable to store the time correctly. Does the following code allow me to create a variable, ...
0
votes
1answer
587 views

Search indexing slow query

Drupal 7.x The search module's indexing maintenance sql query takes a couple of minutes to complete each time cron gets triggered. SELECT t.word AS realword, i.word FROM search_total t LEFT JOIN ...
4
votes
1answer
1k views

When 'cron_safe_threshold' is set to 0 in settings.php, should the dropdown value on admin/config/system/cron be “Never”? or is it irrelevant?

I've installed Drupal 8.1.6. As Ultimate_Cron won't work on this site consistently or reliably, I've decided to just use Drupal's core cron, triggered externally (via /etc/crontab) rather than using ...
0
votes
1answer
26 views

Issues with PSR-0 in hook_cron

after hours trying to solve this issue by myself and searching for solutions in Google I thought that maybe someone may already faced this. Scenario: I am running drush site-install The installation ...
0
votes
1answer
315 views

Fetch data from database in cron_hook

I made a custom module which runs during cron via de cron_hook. On installation of the module a database table is installed: $schema['license_expire'] = array( 'description' => 'The base ...
0
votes
1answer
41 views

Drupal cron is running very frequently

Drupal cron is running every 10 minutes in my site but i have set-ed 1 day time for cron, i have cleared cache and fix all the major php error logs, please help me how to fix this issue.
0
votes
1answer
148 views

How do I disable update checks for locked projects?

I am using drush @sites cron in order to get update notifications in a Drupal 7 multisite configuration. However, I need to have some projects locked, using drush up --lock=context_mobile_detect. ...
1
vote
2answers
289 views

Setting import to run every 15 minutes

I am using Drupal 7.43, and I want to read my data from an external database every 15 minutes. My site is hosted on an Ubuntu server. I am using Feeds importer with SQL parser. From import/...
1
vote
1answer
124 views

How to use the Rules module to unset all flags (set x days ago) when cron runs?

Case: users set flags on content using Flag module (flags are per user, not global). Requirement: after a period of time the system should automatically unset these flags using Rules module. The ...
1
vote
0answers
44 views

How do I delete old nodes (with attachments) after running cron? [duplicate]

I've site on Drupal 8.1.x with many nodes (over 200). That node type is articles. Some nodes are old (written last year, for example) and have non actuality content with attach files (photos). How to ...
17
votes
6answers
9k views

Release cron lock

I ran cron and aborted the execution. Now I get this message: Attempting to re-run cron while it is already running. In Drupal 7, I could delete the cron_semaphore variable. What's the way to ...
1
vote
0answers
39 views

db_create_table every month [closed]

Is it possible to create a table like "tablename_mmyyyy" from my module using hook_cron? db_create_table does not work. I need to create a new table every month.
1
vote
1answer
155 views

Script exits on drupal_bootstrap_full when run from system cron

I have a script that imports data into custom entities created in a drupal 7 database. It needs to run daily so i've added it to my system crontab (running CentOS 6.7). The problem i am having is that ...
0
votes
1answer
93 views

Drupal integration with external binary program to convert an image?

Using Drupal 8. On a cloud based site, I have a program for converting images into svgs that takes, at times, a few hours of run time. I can easily run the external binary program (configured to run ...
4
votes
2answers
612 views

How do I execute a function every 3 months?

What's the proper way to execute a function every 3 months? Watchdog variables don't seem to be available after a certain time. I could create another table to insert the execute function date to ...
1
vote
1answer
868 views

How to disabled Drupal builtin “poormanscron” cron when using Ultimate cron?

I want to disabled Drupal 7 builtin "poormanscron" to then put it into a crontab task as it should, but when using Ultimate cron module i do not see an option to disabled Drupal 7 builtin "...
1
vote
1answer
254 views

Problem with drupal $queue->DrupalQueue::get and $queue->createItem

I am updating approx 10000 nodes using hook_cron_queue_info and hook_cron(), it execute only for 25 nodes. Is there any problem? function my_module_cron_queue_info() { $queues['my_module_batch'] ...
2
votes
1answer
706 views

Does cron queue manage max_execution time?

I have implemented an approximately 1000 nodes update using hook_cron_queue_info() and hook_cron(). When I manually run cron job from the Drupal administration pages, I get a maximum time execution ...
1
vote
1answer
454 views

Timeout in sites, perhaps related to cron

I have been struggling with a timeout error in a couple of Drupal 8 sites, which I have not been able to reproduce. When I deploy them into my colleague's production server (a Mac machine), all the ...
1
vote
3answers
1k views

Solve “Cron run failed” without Watchdog

Some years ago i wanted to turn off watchdog because it's memory and db consumption, but today i need info about why my cron isn't running because need to use Search module from now? Trying to run ...
1
vote
3answers
322 views

elysia_cron setup for custom callback

I have created a custom callback to perform some batch operation. How can I set schedule for execution using elysia_cron?
0
votes
1answer
97 views

Revisions revert unexpectedly

I have a really horrible intermittent bug where a collection of nodes will reset to a previous revision. Here is an image of the revisions tab on the node: There are three unusual aspects: The '...
0
votes
1answer
103 views

Hosting advanced cron for Aegir 3

There was one very useful contributed module named Hosting Advanced Cron. It allowed me to set cron interval per site, instead of set just global for all (and you can even disable cron on specific ...
0
votes
1answer
280 views

cron for rebuild xmlsitemap mannually without drush in cpanel

I'm using this: XMLsitemap module: https://www.drupal.org/project/xmlsitemap I have a cpanel shared hosting in hostgator and drupal 7. I can not install Drush, ssh access is not enabled. i go to ...
2
votes
1answer
119 views

How to limit the execution of a rule for sending an email to only run once in a day?

I have a rule that sends an email out to subscribers on the 28th of each month. The rule is executed when cron is run, I have cron set to automatically run once a day. I also use linkchecker, which ...
3
votes
1answer
873 views

Long-running cron task never fully executed [duplicate]

I am developing a Drupal Cron that has a very long-running task. First I tried with a simple Cron, which, of course, did not work because of "Memory exhausted" PHP fatal error. Then, I developed a ...
0
votes
0answers
35 views

How do I load several feeds sequentially and in order?

I have a site which loads its content nodes using Feeds module. I load several nested taxonomies, and, as indicated in the docs, I use several different feeds. These are called sequentially by hand. ...
0
votes
1answer
80 views

How often i should re-build and re-submit xml sitemap for news website? [closed]

I have an website that get news from RSS Feeds. I build every day 2-3k articles and now i have almost 160k links. So, how often i should re-submit the xml sitemap; (currently i do this job every hour)...
1
vote
0answers
47 views

Cron stuck because update module

My cron is stuck because "Drupal core update status : No update data available", when disable update module, cron run good again. Just try manual update but it run more than 3 minutes then nothing ...
0
votes
1answer
2k views

create and save data to a file in the files folder from cron

I currently have some working example code where when a URL path i defined using hook_menu has been passed; My custom module will use file_get_path() to pull a txt file from another ftp server. It ...
0
votes
2answers
59 views

After every cron job, the Media tags in WYSIWYG markup change to https upon a robot crawl

My site doesn't use https certificates. The Media WYSIWYG markup changes the images protocol and caches them as https and therefore they don't display as there is no certificate on the website!! ...
0
votes
2answers
219 views

Best settings for xml sitemap, cron time and submission time?

i have news site for about 7 months. The site get new feeds every hour but google take about 1 day to index them and only few of them. I see other sites that instantly index. "1 hours ago etc". Mine ...
0
votes
1answer
38 views

how to set cron correctly on a shared server

I set the following command for cron on a shared server. /usr/bin/php5.3 home/public_html/cron.php (All the Drupal files are under /public_html) This commend seems to be working but I get the ...
0
votes
1answer
53 views

Can the reaction of “Cron Maintenance” in the Rules modules pull data from nodes?

Overall Goal: Have an email sent whenever a node has not been commented on for a certain amount of time (ex: 1 hour). Previous Attempt: Have a node become stickied when a comment is posted. Then ...
1
vote
1answer
122 views

Custom VBO Action only works when enqueued (Adding User Role and Organic Group)

I wrote a custom module to add a VBO action that allows an Admin of a group to search the sites users, add them to their list (adds a role to the select users to get them on the list) and then allows ...
1
vote
2answers
2k views

How do I run cron as an authenticated user?

On my site, user profiles are not public; the anonymous user does not have permission to access them. However, I want to send a view containing a list of member profiles in an email with Rules ...
1
vote
1answer
137 views

Cron job stops when another one is running

I have two cron jobs in my site (I'm using Elysia Cron). They are set in my own module. One runs every minute and one every hour. Code below: function mymodule_cronapi($op, $job = NULL) { $items['...
2
votes
2answers
660 views

Can the speed of my cron job be improved?

Can I improve my cron job speed? Ex: it takes me 30 seconds to complete a certain cron job. Can I make it do this faster? Does cron speed depend on the server machine?
2
votes
3answers
129 views

Why the cron is launched when I visit the website and why is it taking so much to complete?

I have a site in development. It has Feeds module installed, with mandatoty Job Scheduler also installed. When I come back to the office to keep working on the site, it takes almost a minute for the ...

1 2
3
4 5
9