MozillaZine

[SOLVED] Calendar View Tab's 'Day' doesn't advance daily

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
NginUS
 
Posts: 97
Joined: July 14th, 2010, 8:31 pm

Post Posted November 13th, 2018, 4:54 am

I tend to keep the app running for weeks at a time. I've noticed after at least 2 days, even if I hit the 'Today' button- the calendar will continue to highlight the day the app was launched unless another day's square gets clicked upon.

Aside from scripting it to be killed & relaunch every day at 00:01, is there another way to force it to refresh properly?

Linux Mint 18.3
Thunderbird 60.2.1
Lightning 6.2.2.1

Thanks...
Last edited by NginUS on December 2nd, 2018, 12:12 am, edited 3 times in total.

NginUS
 
Posts: 97
Joined: July 14th, 2010, 8:31 pm

Post Posted November 14th, 2018, 11:44 pm

Yesterday I had multiple reboots & now today the 'Today' button is advancing the highlighted day to the current day properly. Am going to chalk this up to a fluke occurrence & mark this solved. Thanks nevertheless.

EDIT 2018-12-2:
After further monitoring, the calendar is indeed not advancing daily on its own. The reboot was causing a subsequent exit/restarting of the application which appears to be necessary to cause the calendar to highlight the day upon which the application started.
Last edited by NginUS on December 2nd, 2018, 12:14 am, edited 1 time in total.

NginUS
 
Posts: 97
Joined: July 14th, 2010, 8:31 pm

Post Posted December 1st, 2018, 11:34 pm

NginUS wrote:EDIT 2018-12-2:
After further monitoring, the calendar is indeed not advancing daily on its own. The reboot was causing a subsequent exit/restarting of the application which appears to be necessary to cause the calendar to highlight the day upon which the application started.


As such, I am now looking into a way to script a graceful exit & restart of the Thunderbird application that can be set daily via a cronjob. If anyone has experience on this, I'm all ears. Otherwise, I'll post results of whatever I discover on my own, here later.

TIA...
Last edited by NginUS on December 2nd, 2018, 12:14 am, edited 2 times in total.

NginUS
 
Posts: 97
Joined: July 14th, 2010, 8:31 pm

Post Posted December 2nd, 2018, 12:12 am

Thankfully, this was surprisingly easy to sort out.

It turns out the 'pkill' command works on process names rather than PIDs, so that's easy. Then it has a '-term' flag that will send a request to the application that it initiate an exit by its own volition, thus gracefully preserving state as opposed to an immediate kill.

So I've got this for my script 'ThunderbirdGracefulExitAndRestart.sh':
Code: Select all
#!/bin/bash
pkill -term thunderbird
sleep 30
screen -d -m thunderbird


I scheduled it in my user's (not system/root) cron with:
Code: Select all
crontab -e

Adding this line to the end:
Code: Select all
1 0 * * * sh /home/username/Scripts/ThunderbirdGracefulExitAndRestart.sh


I made the script file executable with:
Code: Select all
chmod +x /home/username/Scripts/ThunderbirdGracefulExitAndRestart.sh

...And the script runs properly when I do it manually with:
Code: Select all
sh /home/username/Scripts/ThunderbirdGracefulExitAndRestart.sh

...The cron syntax checks out okay here: http://cron.schlitt.info, so I expect that to work.

Seems to be all set now. :-D

Return to Calendar


Who is online

Users browsing this forum: No registered users and 0 guests