// CreateJob creates a job and schedules it right away.
CreateJob creates a job and schedules it right away.
// CreateJob creates a job and schedules it right away .
func CreateJob(request CreateJobRequest) (CreateJobResponse, error) {
	job, err := entities.NewJob(
		request.Name,
		request.Command,
		request.Tick,
		true,
	)
	if err != nil {
		return CreateJobResponse{}, err
	}
	err = writer.CreateJob(&job)
	if err != nil {
		return CreateJobResponse{}, err
	}
	return CreateJobResponse{Msg: job.Name + " created"}, nil
}
func CreateJob ( request CreateJobRequest ) ( CreateJobResponse , error ) { job , err := entities . NewJob ( request . Name , request . Command , request . Tick , true , ) if err != nil { return CreateJobResponse { } , err } err = writer . CreateJob ( & job ) if err != nil { return CreateJobResponse { } , err } return CreateJobResponse { Msg : job . Name + " " } , nil }
CreateJob creates a job and schedules it right away.
CreateJob creates a job and schedules it right away .