Hi all,
Note: please redirect me to appropriate forum and/or another site altogether if this is not the right forum.
I am a sysop for a company and we have an application in bitbucket (via the developer team, external to our company) and part of our protocol is that we always need the latest code for projects on premises and backed up by our backup systems. The developer has given access to the project and I do have access to it but I am having trouble pulling it down nightly. The developer told me to install Git and set it up for nightly pulls.
I was able to do an initial clone to pull the code down to disk; I then set up a batch file to run daily and stuff the results into a log. I then used Windows scheduler to run the batch file once a day.
Originally this seemed to work but looking in the logs, it really has not since. The log entry always says "Already up to date" even though I know there are changes going on in the cloud repository.
How do I even go about debugging why no changes are being pulled down?
Here is my code from the batch file:
cd <root of repository on local disk>
git pull >> c:\BitbucketRepos_Git\GitPullLog.txt
If this is something I need to be asking in a Git forum, let me know.
If this would be better done by some other software, also open to that. Keep in mind that the software needs to:
- run under Windows
- needs to be recurring schedule
- needs to be unattended and Windows not logged in (Windows scheduler has an option to "run even if user is not logged in" and then you indicate which Win account to use
Thanks for any help
What happens when you run the .bat manually, not have it executed by the scheduler?
(We are using a totally similar mechanism, but on Linux. It relies on CRON and a simple shell script and it is totally reliable.)
Yeah good question. Does the .bat file work when you run it manually?
Similarly, you said "The log entry always says "Already up to date"." Just curious, are you sure the log file is actually being updated each night? Like, does the "date modified" change or does the log file show the correct date? My thought is that if the .bat is not getting run by the Task Scheduler then the date modified will remain as the last time you manually ran the .bat file. Another option is for you to include some sort of date/timestamp into your `GitPullLog.txt` file name so that it won't overwrite it each time, and you can confirm that the scheduler it running the .bat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.