-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsubmit
More file actions
executable file
·22 lines (20 loc) · 1015 Bytes
/
submit
File metadata and controls
executable file
·22 lines (20 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
# check the existence of config file
if [ ! -e $HOME/.taskSubmitter_config ] && [ ! -e /.taskSubmitter_config ]; then
echo "
you didn't provide config file, please copy and edit the following lines,
then save it to $HOME/.taskSubmitter_config or /.taskSubmitter_config,
remember change the permission of the file to 600, so others won't see your password
optionally you can use an email dedicatd to sending email
receiver=PUT_THE_EMAIL_ADDRESS_YOU_WANT_TO_RECEIVE_EMAIL_NOTIFICATION
sender=PUT_YOUR_EMAIL_ADDRESS_HERE(it needs to support smtp, currently only support gmail)
sender_pass=YOUR PASSWORD
sender_name=OPTIONAL
"
else
nohup $@ > "$(date)" &
pid=$!;
echo "################# RUN JOB $* ($pid) with notification ##################";
nohup watcher.py $pid $* 1>/dev/null 2>&1 &
echo -e "$(date): \t $(pwd): \t $@" >> $HOME/.submitLog 2>/dev/null
fi