#48 Fix schedule.php SCHEDULE_KEY logic use as a parameter

Closed
Syunka wants to merge 0 commits from deleted into master
Syunka commented 7 years ago

Fix schedule.php SCHEDULE_KEY logic use as a parameter

Current logic does not check $argv and only checks $_REQUEST[‘key’] . Added in $argv logic whilst retaining the ?key= functionality.

The original WCD instructions state that SCHEDULE_KEY should be used as a parameter but I cannot see how this would ever work. This code allows SCHEDULE_KEY to be used as a parameter via cron. A simple work-around this is to cron -k https://sitedomain.com/schedule.php?key=SCHEDULE_KEY and perhaps this is what has always been done.

Fix schedule.php SCHEDULE_KEY logic use as a parameter Current logic does not check $argv and only checks $_REQUEST['key'] . Added in $argv logic whilst retaining the ?key= functionality. The original WCD instructions state that SCHEDULE_KEY should be used as a parameter but I cannot see how this would ever work. This code allows SCHEDULE_KEY to be used as a parameter via cron. A simple work-around this is to cron -k https://sitedomain.com/schedule.php?key=SCHEDULE_KEY and perhaps this is what has always been done.
Syunka commented 7 years ago
Poster

FYI to see how this code already works look at peerupdate.php , it uses $argv[1] and this works OK in cron.

FYI to see how this code already works look at peerupdate.php , it uses $argv[1] and this works OK in cron.
spaghetti commented 7 years ago
Owner

Our scheduler is intended to be used via curl from cron, so this behavior is intentional. I will add an example crontab to the wiki

Our scheduler is intended to be used via curl from cron, so this behavior is intentional. I will add an example crontab to the wiki
spaghetti commented 7 years ago
Owner
https://git.oppaiti.me/Oppaitime/Gazelle/wiki/Crontab
Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.