The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hiya
I've been at this for days!!! maybe someone on here could put me out of my misery. I've set up a cron job on my Cpanel to run rssposter.php every 10mins, On the server it shows its excuting the cron job correctly, but its just not posting in my forum threads. Its doing my head in!! I just want to elimate this cronimage way and have my rssposter run every 10mins, updating all the twitter feeds I works when I manually select run now on the rssposter, but not automatically. I've tried all these mod related to it, but there like 7 years old some of them and there not functioning correctly Please help guys!! i wana smash something up Regards lukescotty |
#2
|
|||
|
|||
![]()
You can't run rssposter.php directly or it will just exit. It's meant to be run through cron.php. You could run cron.php in your cron job, but I guess it only runs one pending job and you don't know that it will be rssposter.php.
You asked about this a while back and I remember looking around a little and seeing a script that someone wrote that makes sure all the scheduled tasks run so that you can run it once from a cron job - did you find that? |
#3
|
|||
|
|||
![]()
I think you sent me the link to this one https://www.vbulletin.com/forum/show...ron-VBIV-13733
"You can already do this and have been able to do it since 3.7.0 or so. Use command line PHP and run it as a true cron job. cd /path/to/cron.php; php /path/to/cron.php I've posted this multiple times over the years." but theres alot of debate on this. i've tried it, but its not being working not understanding this run once, part of ur answer. Don't i want in to run more than once? or do you mean run once.... and its continious? |
#4
|
|||
|
|||
![]()
I don't understand everything that's mentioned in that thread, but you could try this: Go to the scheduled task manager and find the id for the RSS poster task (edit the task and it should be at the top of the edit window). Then when setting up your cron job, make it "cron.php X" where X is the id. For instance, mine says the id is 17, so the command would be
cron.php 17 |
#5
|
|||
|
|||
![]()
this ID is the same too "17"
So i've created a new cron job "php /home/sheffiel/public_html/talknightlife.co.uk/cron.php 17" and it runs every 10 mins, but still no joy, do i need to remove the cronimage on the footer? are they conflicting at all (guess) ? "php /home/sheffiel/public_html/talknightlife.co.uk/cron.php 17" this is in my command box for the cron job, btw |
#6
|
|||
|
|||
![]() Quote:
Quote:
Did you check the vb logs to see if anything's getting logged when your cron job runs? |
#7
|
|||
|
|||
![]()
[QUOTE=kh99;2321899]BTW I believe you still need to set the task to run in the scheduled task manager.QUOTE]
The box is checked in schedule task manager. ?? doesnt that mean its set to run ? ( aswell, even though I've set it on certain times ) when looking at the Next Time, it displays a time in the past, even though it should be operating a couple times an hour. |
#8
|
|||
|
|||
![]() Quote:
I seen other people mention that a job doesn't seem to run even if next time is in the past, and I really don't know why that is. I'll have a look at cron.php and see if I can think of anything. |
#9
|
|||
|
|||
![]()
much appreciated kh99, get back to us if u find anything which i could alter in the cron file to put this !pain in the arse! thing to rest.
|
#10
|
|||
|
|||
![]()
OK, I think that didn't work because nothing anywhere in the rest of the vb code ever sets $vbulletin->options['crontab'] to true. I don't know why, maybe it's left over from an old version or some testing. (ETA: sorry, I forgot that you'd have to look at the code for cron.php to see what I mean). Anyway, you could try this: copy cron.php to another file, like maybe runrssposter.php. Then edit that file, and replace all the code including and after the 'cron_start' hook line with:
Code:
($hook = vBulletinHook::fetch_hook('cron_start')) ? eval($hook) : false; $cronid = intval($_SERVER['argv'][1]); // if its a negative number or 0 set it to NULL so it just grabs the next task if ($cronid < 1) { $cronid = NULL; } exec_cron($cronid); $db->close(); then change your cron job to run that file. Sorry, I'd just post the entire thing but posting entire vb files isn't allowed. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|