---
title: 提交脚本作业
description: "1. 使用PuTTY工具，以root用户登录服务器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/instg-osc/kunpenghtcondor_018.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/instg-osc/kunpenghtcondor_018.html
indexId: f85672017f41eb2148ef7fd883f57d9f28a55fceefbce4ce3985b1d2cf258c5c67
---
# 提交脚本作业

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令进入“condor”用户。

```
su - condor
```


3. 执行以下命令进入“/data/examples”目录。

```
cd /data/examples
```


4. 执行以下命令编写“test.sh”文件。

  a. 打开“test.sh”文件。

```
vi test.sh
```


  b. 按“i”进入编辑模式，添加如下内容。

```
#!/bin/bash
for x in {0..10}
do
echo "This is a test"
sleep 5s
done
```


  c. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
5. 执行以下命令编写“test.sub”文件。

  a. 打开“test.sub”文件。

```
vi test.sub
```


  b. 按“i”进入编辑模式，添加如下内容。

```
universe        = vanilla
executable      = ./test.sh
output          = test.o
error           = test.e
log             = test.log
should_transfer_files   = YES
when_to_transfer_output = ON_EXIT
Notification            = never
queue
```


  c. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
6. 执行以下命令提交作业。

```
condor_submit test.sub
```


7. 执行以下命令提交多队列作业，验证集群。

```
cat test.sub
```

```
universe        = vanilla
executable      = ./test.sh
output          = test.o
error           = test.e
log             = test.log
should_transfer_files   = YES
when_to_transfer_output = ON_EXIT
Notification            = never
queue 150
```


8. 执行以下命令进行验证。

```
condor_submit test.sub
```
