How to make character controller jump?

Hello,
how can I make controller jump up outside update function as I need to call it from another script. I have tried doing this, but it doesn’t seem to work at all. Thank you.

public void Move(Vector3 move)
{
    _moveDir = new Vector3(move.x, 0, move.z);
    _moveDir = transform.TransformDirection(_moveDir);
    _moveDir *= _moveSpeed;

    _moveDir.y -= _gravity * Time.deltaTime;
    _controller.Move(_moveDir * Time.deltaTime);
}

public void Jump()
{
    if (_controller.isGrounded)
        _moveDir.y = _jumpForce;
}

In your Move function, you are resetting the value of moveDir.y to 0. Try this way:

public void Move(Vector3 move)
 {
     _moveDir.x = move.x;
     _moveDir.z = move.z;
     _moveDir = transform.TransformDirection(_moveDir);
     _moveDir *= _moveSpeed;
     _moveDir.y -= _gravity * Time.deltaTime;
     _controller.Move(_moveDir * Time.deltaTime);
 }
 public void Jump()
 {
     if (_controller.isGrounded)
         _moveDir.y = _jumpForce;
 }