automated terminal push
This commit is contained in:
@@ -14,7 +14,7 @@ create_cron_job() {
|
|||||||
cron_line="${minute} ${hour} ${day_of_month} ${month} ${day_of_week} ${command}"
|
cron_line="${minute} ${hour} ${day_of_month} ${month} ${day_of_week} ${command}"
|
||||||
|
|
||||||
# Add the cron job for the specified user. Redirects stderr to stdout.
|
# Add the cron job for the specified user. Redirects stderr to stdout.
|
||||||
(crontab -u "$user" -l 2>/dev/null; echo "$cron_line") | crontab -u "$user" -
|
(crontab -u "yankee -l 2>/dev/null; echo "$cron_line") | crontab -u "$user" -
|
||||||
|
|
||||||
echo "Cron job added for user $user:"
|
echo "Cron job added for user $user:"
|
||||||
echo "$cron_line"
|
echo "$cron_line"
|
||||||
@@ -29,7 +29,8 @@ hour="16" # 4 PM in 24-hour format
|
|||||||
day_of_month="*" # Every day of the month
|
day_of_month="*" # Every day of the month
|
||||||
month="*" # Every month
|
month="*" # Every month
|
||||||
day_of_week="*" # Every day of the week
|
day_of_week="*" # Every day of the week
|
||||||
command="/tmp/file.bash"
|
|
||||||
|
command="/yankee-gnome-fire-consumer/consumer.bash"
|
||||||
|
|
||||||
create_cron_job "$user" "$minute" "$hour" "$day_of_month" "$month" "$day_of_week" "$command"
|
create_cron_job "$user" "$minute" "$hour" "$day_of_month" "$month" "$day_of_week" "$command"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user