I am wanting to use the scheduler module on Drupal 6 which adds some fields to a node edit page to Publish or Unpublish the node on a specific day and time. The problem is the scheduler is dependent on cron running. The part I'm confused on is how could you possibly schedule a node to publish or unpublish at a specific time unless cron was just constantly running? In other words, if I created a piece of content and scheduled for it to get published two days from now at 8 in the morning, unless cron was running at 8 in the morning, the node would not get published correct? So say for example we only have our cron running twice a day say at 2 in the morning and maybe 2 in the afternoon (I'm just throwing out arbitrary times) and we have our scheduler set to publish our article at 8 in the morning, it technically wouldn't get published until 2 in the afternoon when the second cron activity ran correct? We obviously don't want cron running all the time as it probably wouldn't be good for the site. Am I missing something as far as how this stuff works? OR does anyone have a better solution for allowing nodes to get published and unpublished at set dates and times?
Thanks
I am hoping you have Scheduler module in mind to do the task which you have to do. As per the documentation of this module it only publish/unpublished the node when your cron run next to your scheduled timing. This is what has been written over there--
Scheduled automated publish and unpublish functions occur via the cron
system so the actual, real world, publication times will be aligned to
when your cron system runs. For example, if you enter a published time
of 3:45pm but cron only runs once an hour on the hour then the real
publish time will be 4:00pm and not 3:45pm.
Related
I've set up a cloud composer environment and I'm very confused with the pricing. In the pricing page, it's written that any environment would have at least 2 DB vCPU and 2 Web server vCPU.
Further in the page, it's written that it's possible to partially run the environment (e.g. 25%/month).
However, in my case, my environment seems to be running 24/24h (my billing report shows ~48 hours of usage per day, corresponding to 24h per vCPU I guess)
The problem is that I've nothing running on it, except for airflow_monitoring DAG, that I can't stop even by switching it off or deleting it (but I read here Why is there an automatic DAG 'airflow_monitoring' generated in GCP Composer? that it was necessary?).
So my question is: why does the doc say I can partially run my environment whereas the latter seems to be running all the time without any DAG scheduled on it?
It's not currently possible to "turn off" an environment aside from deleting it entirely, because there are certain system components that always need to be active (like the managed database). The example is referring to using an environment for development for a week, and then getting rid of it completely.
Airflow consumes CPU and memory regardless of if DAGs are running/scheduled, so Composer is charging for the GCE instances/GKE cluster it's deployed on.
I'm writing an application using meteor and I need to run a process each night at a certain time. This process will need access to Meteor's Mongo database and would benefit from other Meteor features too.
Is it possible to run a meteor process or task of some sort on a scheduled basis? Or will I need to use a different stack to achieve what I want?
There's a smartpackage called meteor-cron that can help you: https://atmosphere.meteor.com/package/cron.
Additionally if you want to go more manual you can use Meteor.setInterval (docs) to run every hour and if its midnight to run your task.
Keep in mind if you use meteor deploy for meteor's free hosting, if no one visits your site it will go into a 'sleep mode' then wake up when the next user visits it. The user won't notice it but your meteor app won't be running to run these tasks.
Totally new to drupal.
I'm building a module that lets the user specifies the time to run an external script through a form. I imagine I'd need to play with hook_cron ? but from what I understand, it only runs when the cron is set up to run. So how do I tell Drupal to run the job at this time and that time,etc, everytime the user submits the form?
For example, the form would look like:
Start: 10:00 am
End: 11:00 am
<Submit>
So when the user submits, Drupal will first run the script (defined in my module) at 10 am then again at 11 am.
What module/hook do I need?
Configure your Drupal site to run its cron every 1 minute. Then implement a hook_cron in your module and inside this function loop through the different jobs added through the form and run them at the given time points entered through the form.
I'm new to drupal 7 and I need to see what cron is running. I had a cron Feeds scheduled to run once a day and it is no longer needed. I deleted the feed but the cron is still running.
Thanks
Drupal has an auto-cron implementation, to disable it go to mysite.com/admin/config/system/cron and set 'Run cron every' to 'Never'.
If that doesn't work check there are no lingering jobs scheduled in your server's crontab.
Hope that helps
EDIT
Just to add, you can't 'see' what jobs are running in Drupal as such because there is only one - the job you can cancel by setting the afore-mentioned setting to 'Never'
Use for this module ultimate_cron
you may read extended log message and control of all cron jobs.
I have a situation in which i am fetching top row from a temporary table and doing a functionality using that details. The temporary table will be updated with the new uploaded file details. I do have an aspx page which does this functionality. The web page is triggered using a task scheduler at some interval of time. My problem is that when the page is triggered
during a schedule if the functionality is not finished before the next trigger the task scheduler gets stuck and won't work unless a new schedule is created.
I have heard that executing the functionality using asp.net threading can solve my problem. Is that possible for my situation? If so any one please help me with code how i can proceed..
Now i just fetch only one top row to do the process. If i can implement this for top few rows (say top 5 rows) then i can increase the speed of my application. Please suggest a solution to implement this as well..
increase the time scheduler time a little bit to it can get completed before another starts.
Improve the update query, so it can save time.
Threading is good idea. But...
Each scheduler should check if the previous one is already running or not, you can put a status of (running/ completed) somewhere in table.
Log scheduler activity (start, end, elapsed time etc), it will help a lot.