-
Notifications
You must be signed in to change notification settings - Fork 4
/
crontab_copy.sh
35 lines (28 loc) · 1.42 KB
/
crontab_copy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copy of cron jobs
# Test by running this command:
# bash /home/pi/Documents/automated_finances/crontab_copy.sh
# To edit with default editor (nano):
# crontab - e
# 30 11,23 * * * cd /home/pi/Documents/automated_finances && /usr/bin/node update_transactions.js
# 35 11,23 * * * cd /home/pi/Documents/automated_finances && /usr/bin/node update_balances.js
# 40 23 * * * cd /home/pi/Documents/automated_finances/drive && /usr/bin/node copy_file.js
# #5 0 * * * bash /home/pi/Documents/automated_finances/curl_copy.sh
# 45 23 * * * cd /home/pi/Documents/automated_finances && /usr/bin/node update_past_files.js
# 1 0 * * * cd /home/pi/Documents/automated_finances && /usr/bin/node update_bills_date.js
echo "Updating transactions..."
cd /home/pi/Documents/automated_finances && /usr/bin/node update_transactions.js
echo "-------"
# sleep is not necessary since it doesn't continue until previous command is finished
# echo "waiting 20 seconds"
# sleep 20
echo "Updating balances..."
cd /home/pi/Documents/automated_finances && /usr/bin/node update_balances.js
echo "-------"
echo "Making backup of file..."
cd /home/pi/Documents/automated_finances/drive && /usr/bin/node copy_file.js
echo "-------"
echo "Updating past file list..."
cd /home/pi/Documents/automated_finances && /usr/bin/node update_past_files.js
echo "-------"
echo "Updating bills date..."
cd /home/pi/Documents/automated_finances && /usr/bin/node update_bills_date.js