code: def write_cron_file(user, path):
      '''
      Writes the contents of a file to a user's crontab
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' cron.write_cron_file root /tmp/new_cron
  
      .. versionchanged:: 2015.8.9
  
      .. note::
  
          Some OS' do not support specifying user via the `crontab` command i.e. (Solaris, AIX)
      '''
      if _check_instance_uid_match(user) or __grains__.get('os_family') in ('Solaris', 'AIX'):
          return __salt__['cmd.retcode'](_get_cron_cmdstr(path),
                                         runas=user,
                                         python_shell=False) == 0
      else:
          return __salt__['cmd.retcode'](_get_cron_cmdstr(path, user),
                                         python_shell=False) == f write_cron_file(user, path):
      '''
      Writes the contents of a file to a user's crontab
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' cron.write_cron_file root /tmp/new_cron
  
      .. versionchanged:: 2015.8.9
  
      .. note::
  
          Some OS' do not support specifying user via the `crontab` command i.e. (Solaris, AIX)
      '''
      if _check_instance_uid_match(user) or __grains__.get('os_family') in ('Solaris', 'AIX'):
          return __salt__['cmd.retcode'](_get_cron_cmdstr(path),
                                         runas=user,
                                         python_shell=False) == 0
      else:
          return __salt__['cmd.retcode'](_get_cron_cmdstr(path, user),
                                         python_shell=False) == 0
docs: Writes the contents of a file to a user's crontab
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' cron.write_cron_file root /tmp/new_cron
  
      .. versionchanged:: 2015.8.9
  
      .. note::
  
          Some OS' do not support specifying user via the `crontab` command i.e. (Solaris, AIX)