
Cron ideas:

Run every night (safe):
0 2 * * * php /path/to/spark attendance:auto-publish >> /var/log/attendance-autopublish.log 2>&1

Or run every Sunday at 23:59 school time.


//attendance tracking for non reported only,
ignore all breaks and school cancelation from weeks calculation analysis
1 not reported absence => send email automated without involving team intervention
2 absences in row or in 3 consecutive weeks, notify the team to call parent and send email, yellow color code
3 absences in row or in 4 consecutive weeks, notify the team to call parent and send email, orange color code
4 absences in row or in 5 consecutive weeks, notify the team to notify parent about student expeled send email, red color code.

2 lates in row or in 3 consecutive weeks, send email automated to parent, color code light Blue
3 lates in row or in 4 consecutive weeks or 2 Lates and 1 Absence, notify the team to call parent and send email, color code dark Blue. 
4 lates in row or in all passed weeks whole school-year, notify the team to call parent and send email, color code Red.  


//attendance emails:
Assalamu Alaikum parents Br. Talha Kamran and Sr. Zaheen Asia,

Insha Allah this email will find you well. ahmed ahmed to you and your family. Thank you very much for taking the time to speak with us. This is just a reminder that ahmed ahmed was absent 2 times in a row without notice. Any student that has to be absent due to illness or family commitment, that's OK as long as the school is given prior notice. Please let us know ahead of time. You can always email us/call us/text us at 978-364-0219 to let us know in advance if your child will be absent/late.
 
Kind Regards,
-Al Rahma Admin

///////////////////////////////////
Assalamu Alaikum parents Br. Elias Fahfouhi and Sr. Angelica Fahfouhi,

Insha Allah this email will find you well. Thank you very much for taking the time to speak with us. This is just a reminder that ahmed ahmed were absent 2 times in the last 3 weeks without notice. If your child has to be absent due to other commitments or illness, that's OK as long as the school is given prior notice. Please let us know ahead of time. You can always email us or call us/text us at 978-364-0219 to let us know in advance if your child will be absent/late.
 
Kind Regards,
-Al Rahma Admin

////////////////////////
Assalamu Alaikum parents Br. Talha Kamran and Sr. Asia Zaheen,

Insha Allah this email will find you well. We tried getting in touch with you but unfortunately we couldn't reach you, and left a voice message at 978-893-9703. This is just a reminder that ahmed ahmed was absent once and late twice over the last three school days without notice. Students have to be in class by 10 AM. If your child has to be absent or late due to illness or family commitment, that's OK as long as the school is given prior notice. Please let us know ahead of time. You can always email us/call us/text us at 978-364-0219 to let us know in advance if your child will be absent/late.
 
Kind Regards,
-Al Rahma Admin

////////////////////////
Assalamu Alaikum parents Br. Mubiru Sheba and Sr. Sylbert Jackson,

Insha Allah this email will find you well. Thank you very much for taking the time to speak with us. This is just a reminder that ahmed ahmed was absent 2 times in a row without notice. If your child has to be absent due to illness or family commitment, that's OK as long as the school is given prior notice. Please let us know ahead of time. You can always email us/call us/text us at 978-364-0219 to let us know in advance if your child will be absent/late.
 
Kind Regards,
-Al Rahma Admin








Christy	Wyatt
259
STU2500259
Zaineb
Elmerse	
christy.lee.wyatt@gmail.com