This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sermn_wiki:userpages:marta:reserves_automatiques_rutina [2013/10/18 14:46] miquel [Seguretat] |
sermn_wiki:userpages:marta:reserves_automatiques_rutina [2019/07/19 15:43] (current) miquel [Reserves automàtiques per la Cua de Rutina] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Reserves automàtiques per la Cua de Rutina ====== | ====== Reserves automàtiques per la Cua de Rutina ====== | ||
+ | |||
+ | <WRAP important> | ||
+ | Les reserves automàtiques per la Cua de Rutina s'han **desactivat amb data de 2019-07-19.** | ||
+ | </ | ||
+ | |||
FIXME explicar el programet per fer les reserves automàtiques per la cua de rutina i les condicions de funcionament de l' | FIXME explicar el programet per fer les reserves automàtiques per la cua de rutina i les condicions de funcionament de l' | ||
Line 5: | Line 10: | ||
===== routine_nmr_bookings.sh ===== | ===== routine_nmr_bookings.sh ===== | ||
- | Aquest es el programet que crea les reserves per la cua de rutina. S' | + | Aquest es el programet que crea les reserves per la cua de rutina. S' |
- | < | + | < |
#!/bin/bash | #!/bin/bash | ||
# | # | ||
Line 23: | Line 28: | ||
# To run this script every Sunday 2am append an entry like, | # To run this script every Sunday 2am append an entry like, | ||
# | # | ||
- | # FIXME 0 2 * * 1 / | + | # FIXME 0 2 * * Sun / |
# | # | ||
# to crontab. This entry means, at minute 0, hour 2, on every (*) day of | # to crontab. This entry means, at minute 0, hour 2, on every (*) day of | ||
Line 59: | Line 64: | ||
# Bumblebee booking system database where everything gets stored | # Bumblebee booking system database where everything gets stored | ||
- | myuser=' | + | myuser=' |
- | mypass=' | + | mypass=' |
- | mydb='xxxxxxx' | + | mydb='*****' |
Line 87: | Line 92: | ||
VALUES (date_add( date_add( current_date(), | VALUES (date_add( date_add( current_date(), | ||
- | /* Friday from 16:00 to 10:00 next Monday | + | /* Friday from 16:00 to 10:00 next day -> 18 hours */ |
INSERT INTO bookings(bookwhen, | INSERT INTO bookings(bookwhen, | ||
- | VALUES (date_add( date_add( current_date(), | + | VALUES (date_add( date_add( current_date(), |
+ | |||
+ | /* Saturday from 10:00 to 00:00 next day -> 14 hours */ | ||
+ | INSERT INTO bookings(bookwhen, | ||
+ | VALUES (date_add( date_add( current_date(), | ||
+ | |||
+ | /* Sunday from 00:00 to 00:00 next day -> 24 hours */ | ||
+ | INSERT INTO bookings(bookwhen, | ||
+ | VALUES (date_add( date_add( current_date(), | ||
+ | |||
+ | /* Monday from 00:00 to 10:00 -> 10 hours */ | ||
+ | INSERT INTO bookings(bookwhen, | ||
+ | VALUES (date_add( date_add( current_date(), | ||
/* commit transaction */ | /* commit transaction */ | ||
Line 145: | Line 162: | ||
< | < | ||
-------- Original Message -------- | -------- Original Message -------- | ||
- | Subject: | + | Subject: |
Date: Fri, 18 Oct 2013 11:12:02 +0200 | Date: Fri, 18 Oct 2013 11:12:02 +0200 | ||
From: root < | From: root < | ||
- | To: | + | To: |
AUTOMATED EMAIL MESSAGE. DO NOT REPLY | AUTOMATED EMAIL MESSAGE. DO NOT REPLY | ||
Line 154: | Line 171: | ||
SeRMN - Universitat Autonoma de Barcelona | SeRMN - Universitat Autonoma de Barcelona | ||
- | Time slots at the Bruker DPX-250 spectrometer have been allocated for Routine NMR on week 42/2013 starting: Sat 2013/11/02. | + | Time slots at the Bruker DPX-250 spectrometer have been |
+ | allocated for Routine NMR on week 42/2013 starting: | ||
+ | Sat 2013/11/02. | ||
</ | </ | ||
Line 161: | Line 180: | ||
< | < | ||
-------- Original Message -------- | -------- Original Message -------- | ||
- | Subject: | + | Subject: |
Date: Fri, 18 Oct 2013 11:09:27 +0200 | Date: Fri, 18 Oct 2013 11:09:27 +0200 | ||
From: root < | From: root < | ||
- | To: | + | To: |
AUTOMATED EMAIL MESSAGE. DO NOT REPLY | AUTOMATED EMAIL MESSAGE. DO NOT REPLY | ||
Line 170: | Line 189: | ||
SeRMN - Universitat Autonoma de Barcelona | SeRMN - Universitat Autonoma de Barcelona | ||
- | Failed to allocate time slots to the Routine NMR at the Bruker DPX-250 spectrometer on week 42/2013 starting: Sat 2013/11/02. | + | Failed to allocate time slots to the Routine NMR at the |
+ | Bruker DPX-250 spectrometer on week 42/2013 starting: | ||
+ | Sat 2013/11/02. | ||
Please, report this issue to the system administrator. | Please, report this issue to the system administrator. | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== Entrada al registre crontab ===== | ||
Aquesta és l' | Aquesta és l' | ||
Line 181: | Line 205: | ||
# run every Sunday at 02:00. | # run every Sunday at 02:00. | ||
# | # | ||
- | 0 | + | 0 |
</ | </ | ||
Line 188: | Line 212: | ||
Per motius de seguretat (el programet conté el nom d' | Per motius de seguretat (el programet conté el nom d' | ||
- | * permisos: | + | * permisos |
+ | * permisos fitxer '' | ||
* propietari (user: | * propietari (user: | ||
Line 197: | Line 222: | ||
deny from all | deny from all | ||
</ | </ | ||
+ | |||
+ | ===== Actualització dels permisos dels usuaris ===== | ||
+ | |||
+ | Aquest és el codi que permet actualitzar els permisos dels usuaris i donar accés al 250-ROBOT als usuaris amb accés al 250-AUTOSERVEI que no tenen el compte suspès ni cancel·lat. | ||
+ | |||
+ | <code sql> | ||
+ | INSERT INTO permissions (userid, instrid, isadmin, | ||
+ | announce, unbook, haspriority, | ||
+ | SELECT permissions.userid, | ||
+ | FROM permissions, | ||
+ | WHERE permissions.userid = users.id | ||
+ | AND permissions.instrid = 12 | ||
+ | AND users.deleted = 0 | ||
+ | </ | ||
+ | |||