Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Scheduled nodes works but it depends on cron run. How can we run cron or lightweight cron on exact time of scheduled nodes.
For example
I schedule the publishing of a node to 10:35h
but cron only runs once every 30 minutes
then the content will be published at 11h
How to published exactly 10:35h
Many Thanks
Comments
Comment #2
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedHi Mudassar,
Scheduler publishes the nodes during cron, as you know. So if you want a node published very precisely at a time which is inbetween existing cron runs you simply need to have cron runs more frequently. There might be an overhead on some sites if the full cron job is run frequently, so this is why we have provided the lightweight cron job
scheduler/cron/{access key}
. You can set up a crontab to call this url every five minutes, or even every single minute if you really want. It will only do Scheduler processing so is very quick and will not overload your server.Do you have access to your hosting crontab set-up? Or are you setting up the jobs manualy in a terminal window?
To run the Scheduler cron every 5 minutes the command might look like:
For more help with setting up cron jobs see https://www.drupal.org/docs/7/setting-up-cron
Jonathan
Comment #3
mudassar774 CreditAttribution: mudassar774 commentedHi jonathan
Thanks you very much for your reply. Yes, I have access to cron tab and now bit confident to go with that solution -:)
Mudassar
Comment #4
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedThat's good to hear. Let me know if you want any more help with crontab.
Comment #5
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedI have added that link on setting up cron jobs to the project front page.
Closing this issue now.
Comment #6
xjkwak CreditAttribution: xjkwak as a volunteer commentedThank you @jonathan1055. Your comment #2 works for me too!