我有一些文件,我想确保使用Tortoise SVN保持最新状态。我使用了命令行并创建了一个批处理文件,当我用户执行它们时都运行成功。
但是,当我使用Windows任务计划程序尝试为批处理脚本安排自动化时,它无法成功运行;它只是挂起并无休止地运行。无论是否使用自动化,日志文件看起来都一样。也就是说,我必须手动结束任务调度程序中的自动化,然后运行SVN清理命令以从未完成的任务中删除保留在文件上的锁。
造成这种情况的原因是什么,以及如何使自动化成功运行并且没有文件锁定问题?
我的后台脚本代码如下:
import React from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {Link} from 'react-router-dom';
import Header from './Header.jsx';
import axios from 'axios';
class Book extends React.Component {
constructor(props) {
super(props);
this.state = {
book:Object,
user:Object,
chapters:[],
chapterCount:0,
ready:false,
};//end of state
}//end of constructor
start() {
console.log(this.state.book)
}
showChapters() {
let chapterCount = this.state.chapterCount;
let chapters = this.state.book.length;
let chatpersArr = this.state.chapters;
for(let i = 0; i < chapters; i++) {
chatpersArr.push([])
}
return (
chatpersArr.map((ch, id) => {
chapterCount++;
return (
<p key={id} className='bookChapters' data-index={id}>{this.state.book.book} Chapter:{chapterCount}</p>
)
})
)
}//end start
componentWillMount() {
//Always gettting the last book out of the array
//AUTHENTICATES THE USER
axios.get('/login').then(res => {
let userInfo = res.data;
if(userInfo === "Not Authenticated") {
window.location = "/?#/";
}
});//end of axios GET
//GETS THE CORRECT BOOK FROM THE REDUCER
if(this.props.book.editBookReducer.length - 1 === -1) {
window.location = "/?#/user";
}
else {
let lastBook = this.props.book.editBookReducer.length -1;
let book = this.props.book.editBookReducer[lastBook].data.book;
let user = this.props.book.editBookReducer[lastBook].data.user;
this.setState({book, user, ready:true});
}
}//end componentWillMount
render() {
if(!this.state.ready){
return false;
}
else {
return (
<div>
<Header/>
<button onClick={this.start.bind(this)} >start</button>
<div className="container">
<div className="row" style={{"textAlign": "center"}}>
<div className="col-md-12">
<h1>{this.state.book.book}</h1>
</div>
</div>
<div className="row" style={{"textAlign": "center"}}>
<div className="col-md-6">
{this.showChapters()}
</div>
<div className="col-md-6">
<textarea name="" id="" cols="50" rows="60"></textarea>
</div>
</div>
</div>
</div>
);
}
}
}//end class Book
function mapDispatchToProps(dispatch) {
return bindActionCreators({
},
dispatch)
}
function mapStateToProps(state) {
return {
book:state
}
}
export default connect(mapStateToProps, mapDispatchToProps)(Book);
为了透明,我尝试将“他们的冲突”选项更改为其他设置(并完全删除)。每种情况下的症状都是一样的。