Nginx "Bad Gateway" after restart

Hi,
whenever I restart my server, the directory /tmp/seahub_cache will be created as follows:

drwx------ 2 root root 4096 Mär 3 09:00 seahub_cache

Therefore the seafile service cannot be startet:

root@lkb:/# /etc/init.d/seafile-server start
Traceback (most recent call last):
  File "/blackhole/seafile/server/seahub/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/blackhole/seafile/server/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/blackhole/seafile/server/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/core/management/__init__.py", line 328, in execute
    django.setup()
  File "/blackhole/seafile/server/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/blackhole/seafile/server/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/apps/registry.py", line 115, in populate
    app_config.ready()
  File "/blackhole/seafile/server/seahub/seahub/base/apps.py", line 11, in ready
    cache.set('test_cache', 'worked')
  File "/blackhole/seafile/server/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/core/cache/backends/filebased.py", line 52, in set
    fd, tmp_path = tempfile.mkstemp(dir=self._dir)
  File "/usr/lib/python2.7/tempfile.py", line 314, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib/python2.7/tempfile.py", line 244, in _mkstemp_inner
    fd = _os.open(file, flags, 0600)
OSError: [Errno 13] Permission denied: '/tmp/seahub_cache/tmp5l0fc_'

I need to delete the directory as stated in the manual (https://manual.seafile.com/faq/), then I can start the service and the directory is created like this:
drwx------ 2 seafile-service seafile-group 4096 Mär 3 09:05 seahub_cache

How can this be fixed?

ok, I found the problem: I added seahub.sh clearsessions to the crontab for execution at reboot. I think this is creating the directory with wrong permissions.
What is the best point to execute this? Is it necessary to run this when the server has rebooted?