at not executing scheduled command - troubleshootingDoes at scheduled tasks remain after reboot?Get PID of...
Why we don’t make use of the t-distribution for constructing a confidence interval for a proportion?
How can I get an unreasonable manager to approve time off?
How to ensure color fidelity of the same file on two computers?
Does the Long March-11 increase its thrust after clearing the launch tower?
Extreme flexible working hours: how to get to know people and activities?
Heap allocation on microcontroller
Traversing Oceania: A Cryptic Journey
Meaning of 'lose their grip on the groins of their followers'
Fermat's statement about the ancients: How serious was he?
Why was this person allowed to become Grand Maester?
Is it possible to fly backward if you have 'really strong' headwind?
How to decline a wedding invitation from a friend I haven't seen in years?
How to use memset in c++?
How to handle (one's own) self-harm scars (on the arm), in a work environment?
Bb13b9 confusion
Check if three arrays contains the same element
Generate basis elements of the Steenrod algebra
Overlapping String-Blocks
CSV how to trim values to 2 places in multiple columns using UNIX
If I leave the US through an airport, do I have to return through the same airport?
Teaching a class likely meant to inflate the GPA of student athletes
Cascading Switches. Will it affect performance?
Are there any important biographies of nobodies?
US doctor working in Tripoli wants me to open online account
at not executing scheduled command - troubleshooting
Does at scheduled tasks remain after reboot?Get PID of scheduled job (using at)?Stopping one particular command scheduled by at command except othersDoes my scheduled task using “at” command run if I am logged out?How to show a at scheduled command?parallel processing reading from a file in a loopDifferences between command line and scheduled execution with `at` causing unresponsive ChromeRun scheduled at job nowRemove all scheduled before 17:00 jobs with atrmCommand not executing over SSH
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am writing this bash script, that will read a file containing a date, a time and a phone number, and it will use an SMS provider API to send an sms reminder.
#!/bin/bash
while read date time phone
do
user=user
pass=pass
senderid=senderid
message=Your%20appointment%20is%20at%20$date%20$time.%20For%20cancellations%20call%2096989898.%20Thank%20you.
api="https://sms.service.com/Websms/sendsms.aspx?User=$user&passwd=$pass&mobilenumber=357$phone&message=$message&senderid=$senderid&type=0"
curl -k $api
done < ~/sms_reminders/events/events_$(date +%d-%m-%y)
When I run it like this, I receive an SMS immediately. But I want to schedule the reminder to go out at a specific time. So I change the script to this.
#!/bin/bash
while read date time phone
do
user=user
pass=pass
senderid=senderid
message=Your%20appointment%20is%20at%20$date%20$time.%20For%20cancellations%20call%2096989898.%20Thank%20you.
api="https://sms.service.com/Websms/sendsms.aspx?User=$user&passwd=$pass&mobilenumber=357$phone&message=$message&senderid=$senderid&type=0"
echo curl -k $api | at $time
done < ~/sms_reminders/events/events_$(date +%d-%m-%y)
And I get a message saying
warning: commands will be executed using /bin/sh
job 22 at Fri Jun 6 21:46:00 2019
Which is good.
But I never receive the SMS.
My guess is that the issue has something to do with sh, but I have no way of being sure because at doesn't really generate a log file saying if the command was completed successfully or not.
bash shell-script at
add a comment |
I am writing this bash script, that will read a file containing a date, a time and a phone number, and it will use an SMS provider API to send an sms reminder.
#!/bin/bash
while read date time phone
do
user=user
pass=pass
senderid=senderid
message=Your%20appointment%20is%20at%20$date%20$time.%20For%20cancellations%20call%2096989898.%20Thank%20you.
api="https://sms.service.com/Websms/sendsms.aspx?User=$user&passwd=$pass&mobilenumber=357$phone&message=$message&senderid=$senderid&type=0"
curl -k $api
done < ~/sms_reminders/events/events_$(date +%d-%m-%y)
When I run it like this, I receive an SMS immediately. But I want to schedule the reminder to go out at a specific time. So I change the script to this.
#!/bin/bash
while read date time phone
do
user=user
pass=pass
senderid=senderid
message=Your%20appointment%20is%20at%20$date%20$time.%20For%20cancellations%20call%2096989898.%20Thank%20you.
api="https://sms.service.com/Websms/sendsms.aspx?User=$user&passwd=$pass&mobilenumber=357$phone&message=$message&senderid=$senderid&type=0"
echo curl -k $api | at $time
done < ~/sms_reminders/events/events_$(date +%d-%m-%y)
And I get a message saying
warning: commands will be executed using /bin/sh
job 22 at Fri Jun 6 21:46:00 2019
Which is good.
But I never receive the SMS.
My guess is that the issue has something to do with sh, but I have no way of being sure because at doesn't really generate a log file saying if the command was completed successfully or not.
bash shell-script at
Is the date and time correct in the output of theatcommand? The date and time that you show has not occurred anywhere on the planet yet.
– Kusalananda♦
5 hours ago
yeah that was a typo. The date is correct.
– aristosv
5 hours ago
Have a look at whatever log file cron writes to and see ifatrunor similar process executes your scheduled jobs. I'm assuming thatatqdoes not show the jobs any longer?
– Kusalananda♦
5 hours ago
the unquoted$apicontains&...
– Jeff Schaller♦
5 hours ago
add a comment |
I am writing this bash script, that will read a file containing a date, a time and a phone number, and it will use an SMS provider API to send an sms reminder.
#!/bin/bash
while read date time phone
do
user=user
pass=pass
senderid=senderid
message=Your%20appointment%20is%20at%20$date%20$time.%20For%20cancellations%20call%2096989898.%20Thank%20you.
api="https://sms.service.com/Websms/sendsms.aspx?User=$user&passwd=$pass&mobilenumber=357$phone&message=$message&senderid=$senderid&type=0"
curl -k $api
done < ~/sms_reminders/events/events_$(date +%d-%m-%y)
When I run it like this, I receive an SMS immediately. But I want to schedule the reminder to go out at a specific time. So I change the script to this.
#!/bin/bash
while read date time phone
do
user=user
pass=pass
senderid=senderid
message=Your%20appointment%20is%20at%20$date%20$time.%20For%20cancellations%20call%2096989898.%20Thank%20you.
api="https://sms.service.com/Websms/sendsms.aspx?User=$user&passwd=$pass&mobilenumber=357$phone&message=$message&senderid=$senderid&type=0"
echo curl -k $api | at $time
done < ~/sms_reminders/events/events_$(date +%d-%m-%y)
And I get a message saying
warning: commands will be executed using /bin/sh
job 22 at Fri Jun 6 21:46:00 2019
Which is good.
But I never receive the SMS.
My guess is that the issue has something to do with sh, but I have no way of being sure because at doesn't really generate a log file saying if the command was completed successfully or not.
bash shell-script at
I am writing this bash script, that will read a file containing a date, a time and a phone number, and it will use an SMS provider API to send an sms reminder.
#!/bin/bash
while read date time phone
do
user=user
pass=pass
senderid=senderid
message=Your%20appointment%20is%20at%20$date%20$time.%20For%20cancellations%20call%2096989898.%20Thank%20you.
api="https://sms.service.com/Websms/sendsms.aspx?User=$user&passwd=$pass&mobilenumber=357$phone&message=$message&senderid=$senderid&type=0"
curl -k $api
done < ~/sms_reminders/events/events_$(date +%d-%m-%y)
When I run it like this, I receive an SMS immediately. But I want to schedule the reminder to go out at a specific time. So I change the script to this.
#!/bin/bash
while read date time phone
do
user=user
pass=pass
senderid=senderid
message=Your%20appointment%20is%20at%20$date%20$time.%20For%20cancellations%20call%2096989898.%20Thank%20you.
api="https://sms.service.com/Websms/sendsms.aspx?User=$user&passwd=$pass&mobilenumber=357$phone&message=$message&senderid=$senderid&type=0"
echo curl -k $api | at $time
done < ~/sms_reminders/events/events_$(date +%d-%m-%y)
And I get a message saying
warning: commands will be executed using /bin/sh
job 22 at Fri Jun 6 21:46:00 2019
Which is good.
But I never receive the SMS.
My guess is that the issue has something to do with sh, but I have no way of being sure because at doesn't really generate a log file saying if the command was completed successfully or not.
bash shell-script at
bash shell-script at
edited 51 mins ago
Rui F Ribeiro
42.8k1688149
42.8k1688149
asked 5 hours ago
aristosvaristosv
316
316
Is the date and time correct in the output of theatcommand? The date and time that you show has not occurred anywhere on the planet yet.
– Kusalananda♦
5 hours ago
yeah that was a typo. The date is correct.
– aristosv
5 hours ago
Have a look at whatever log file cron writes to and see ifatrunor similar process executes your scheduled jobs. I'm assuming thatatqdoes not show the jobs any longer?
– Kusalananda♦
5 hours ago
the unquoted$apicontains&...
– Jeff Schaller♦
5 hours ago
add a comment |
Is the date and time correct in the output of theatcommand? The date and time that you show has not occurred anywhere on the planet yet.
– Kusalananda♦
5 hours ago
yeah that was a typo. The date is correct.
– aristosv
5 hours ago
Have a look at whatever log file cron writes to and see ifatrunor similar process executes your scheduled jobs. I'm assuming thatatqdoes not show the jobs any longer?
– Kusalananda♦
5 hours ago
the unquoted$apicontains&...
– Jeff Schaller♦
5 hours ago
Is the date and time correct in the output of the
at command? The date and time that you show has not occurred anywhere on the planet yet.– Kusalananda♦
5 hours ago
Is the date and time correct in the output of the
at command? The date and time that you show has not occurred anywhere on the planet yet.– Kusalananda♦
5 hours ago
yeah that was a typo. The date is correct.
– aristosv
5 hours ago
yeah that was a typo. The date is correct.
– aristosv
5 hours ago
Have a look at whatever log file cron writes to and see if
atrun or similar process executes your scheduled jobs. I'm assuming that atq does not show the jobs any longer?– Kusalananda♦
5 hours ago
Have a look at whatever log file cron writes to and see if
atrun or similar process executes your scheduled jobs. I'm assuming that atq does not show the jobs any longer?– Kusalananda♦
5 hours ago
the unquoted
$api contains & ...– Jeff Schaller♦
5 hours ago
the unquoted
$api contains & ...– Jeff Schaller♦
5 hours ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f523400%2fat-not-executing-scheduled-command-troubleshooting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f523400%2fat-not-executing-scheduled-command-troubleshooting%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is the date and time correct in the output of the
atcommand? The date and time that you show has not occurred anywhere on the planet yet.– Kusalananda♦
5 hours ago
yeah that was a typo. The date is correct.
– aristosv
5 hours ago
Have a look at whatever log file cron writes to and see if
atrunor similar process executes your scheduled jobs. I'm assuming thatatqdoes not show the jobs any longer?– Kusalananda♦
5 hours ago
the unquoted
$apicontains&...– Jeff Schaller♦
5 hours ago