[Evolution] Unable to launch Evolution from a cron job



        Hi Evolution enthusiasts,

I've exhausted what I can find on the web and am looking for some
guidance. I'm running Evolution 3.36.4 on a MINT 20.1 system. I am
trying to perform nightly backups by running the "evolution-backup"
utility in a script called by cron. 

When this script is run from command line (as my normal user),
everything works great and evolution restarts after the backup.

However, when run from cron (as my normal user, not root), I can see
that the evolution shutdown works great and that the file backup also
works. But, Evolution does not restart again irrespective of whether
the --restart option is used or not.

Key elements in my script:
# create a timestamped name for the backup file
BACKUPFOLDER="/mnt/backup_disk2/evolution_email_on_beeker/"
BACKUPFILE="$BACKUPFOLDER$(date +%F)-evolution-darrell.tar.gz"
touch $BACKUPFOLDER"cron-backup-started"
#
# to get a clean backup shutdown evolution first
evolution --force-shutdown
#
# perform the actual backup
/usr/libexec/evolution/evolution-backup --restart --backup $BACKUPFILE
touch $BACKUPFOLDER"cron-backup-finished"
#

I also tried restarting it with
        evolution & disown evolution
        nohup evolution > /dev/null 2>&1
and neither of them work either in cron but work fine in the script
when run from command line.

I'm not a Linux expert and am perplexed by this behaviour. It would
seem that some critical information needed to restart is getting lost.
But, this is only the case running from cron. From command line all is
good.

Any ideas anyone?

        Thanks in advance,
        Darrell ... 

PS - this is my first post to this list and apologize in advance for
incorrect formatting or protocol.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]