Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Judge whether there is a reservation currently and execute the corresponding script. #3713

Open
flyxj opened this issue Aug 4, 2024 · 6 comments
Labels
support request Need assistance with MRBS

Comments

@flyxj
Copy link

flyxj commented Aug 4, 2024

Thank you very much for this open source project. I need some help with development.

I added a "secret" field to the database "mrbs_room" and assigned an initial value. When the start time of a reservation by an ordinary user of level 1 arrives, a shell script is executed. And after this user logs in within the reserved time range, he can see the value of the "secret" field corresponding to the room he reserved on a certain page. When the end time of the reservation arrives, another shell script is executed.

MRBS version:1.11.5

How should I do this? I hope you can give me some directions. Thank you very much.

@flyxj flyxj added the support request Need assistance with MRBS label Aug 4, 2024
@campbell-m
Copy link
Contributor

Do you want to email the user when the start time arrives, or just change the visibility of the field? If you want to email the user you'll need a cron job running regularly checking for start times. If you just need to change the visibility of the field then you can do that by editing the MRBS code.

@flyxj
Copy link
Author

flyxj commented Aug 5, 2024

Thank you for your reply.

It would be best to modify the visibility of the field, because I have other features that I want to implement based on this.

@campbell-m
Copy link
Contributor

I'm not sure I can help you very much. You'll need to modify the MRBS code and make the field visible depending on the current time.

@flyxj
Copy link
Author

flyxj commented Aug 5, 2024

Still thank you.

I'll go and check how to achieve it using the mail.

@flyxj
Copy link
Author

flyxj commented Aug 5, 2024

Dear campbell-m

I have successfully configured the email service and received the email for the new appointment.

How can I use the crontab to detect whether there is an appointment at the current time every hour and send mail to booker.

I used MRBS docker-app for the deployment.

@campbell-m
Copy link
Contributor

How can I use the crontab to detect whether there is an appointment at the current time every hour and send mail to booker.

You will have to write your own PHP script that queries the MRBS database for meetings that are about to start and then sends an email to the booker. You should also record in the database that an email has been sent in case the cronjob doesn't run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support request Need assistance with MRBS
Projects
None yet
Development

No branches or pull requests

2 participants