Cronjob not running in Ubuntu (it used to run OK under Debian)Why does Crontab give me an error with my PHP...

Print "N NE E SE S SW W NW"

Purpose of cylindrical attachments on Power Transmission towers

My mom's return ticket is 3 days after I-94 expires

Keeping track of theme when improvising

How can powerful telekinesis avoid violating Newton's 3rd Law?

What are some of the expected properties of metallic glasses and some steps to create them? (semi-ELI5)

Nth term of Van Eck Sequence

Are skill challenges an official option or homebrewed?

Why is it bad to use your whole foot in rock climbing

Is it advisable to add a location heads-up when a scene changes in a novel?

Part of my house is inexplicably gone

As easy as Three, Two, One... How fast can you go from Five to Four?

Approach sick days in feedback meeting

What's the difference between DHCP and NAT? Are they mutually exclusive?

Why are ambiguous grammars bad?

Is Jesus the last Prophet?

Can we decompose every group element to elements of order 2? (using Cayley's theorem to identificate the group with permutations)

Is it possible to have battery technology that can't be duplicated?

Why would a home insurer offer a discount based on credit score?

A life of PhD: is it feasible?

Changing the PK column of a data extension without completely recreating it

Harley Davidson clattering noise from engine, backfire and failure to start

Boss making me feel guilty for leaving the company at the end of my internship

usage of mir gefallen



Cronjob not running in Ubuntu (it used to run OK under Debian)


Why does Crontab give me an error with my PHP script when running it from the terminal does not?Strange crontab-script interaction (bash)Determine if Git working directory is clean from a scriptAWS CLI - not working in a crontabPrintenv from inside cronjob not reporting shebanged interpreterCron shell ignores runuser command - why?Cronjob output not workingHow are files under /etc/cron.d used?Cronjob won't run properlyCrontab not executing script that change background






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















In my crontab, I have several scripts, which have no problem to run, except one git command.



The git command is: */30 * * * * cd /media/a/directory/ && git commit -a -m "automatic"



This command runs OK in the shell, and it runs OK when I put it into a script file (with #! /bin/bash as shebang).



What's wrong?










share|improve this question























  • Is it the very last command in your crontab?

    – Nasir Riley
    1 hour ago






  • 1





    Best to use full paths for executables in cron tabs. cron might be running in a sparse environment For standard Ubuntu with git installed from the apt repositiory try /usr/bin/git

    – Stephen Boston
    20 mins ago




















0















In my crontab, I have several scripts, which have no problem to run, except one git command.



The git command is: */30 * * * * cd /media/a/directory/ && git commit -a -m "automatic"



This command runs OK in the shell, and it runs OK when I put it into a script file (with #! /bin/bash as shebang).



What's wrong?










share|improve this question























  • Is it the very last command in your crontab?

    – Nasir Riley
    1 hour ago






  • 1





    Best to use full paths for executables in cron tabs. cron might be running in a sparse environment For standard Ubuntu with git installed from the apt repositiory try /usr/bin/git

    – Stephen Boston
    20 mins ago
















0












0








0








In my crontab, I have several scripts, which have no problem to run, except one git command.



The git command is: */30 * * * * cd /media/a/directory/ && git commit -a -m "automatic"



This command runs OK in the shell, and it runs OK when I put it into a script file (with #! /bin/bash as shebang).



What's wrong?










share|improve this question














In my crontab, I have several scripts, which have no problem to run, except one git command.



The git command is: */30 * * * * cd /media/a/directory/ && git commit -a -m "automatic"



This command runs OK in the shell, and it runs OK when I put it into a script file (with #! /bin/bash as shebang).



What's wrong?







cron git troubleshooting






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









Quora FeansQuora Feans

1,55552136




1,55552136













  • Is it the very last command in your crontab?

    – Nasir Riley
    1 hour ago






  • 1





    Best to use full paths for executables in cron tabs. cron might be running in a sparse environment For standard Ubuntu with git installed from the apt repositiory try /usr/bin/git

    – Stephen Boston
    20 mins ago





















  • Is it the very last command in your crontab?

    – Nasir Riley
    1 hour ago






  • 1





    Best to use full paths for executables in cron tabs. cron might be running in a sparse environment For standard Ubuntu with git installed from the apt repositiory try /usr/bin/git

    – Stephen Boston
    20 mins ago



















Is it the very last command in your crontab?

– Nasir Riley
1 hour ago





Is it the very last command in your crontab?

– Nasir Riley
1 hour ago




1




1





Best to use full paths for executables in cron tabs. cron might be running in a sparse environment For standard Ubuntu with git installed from the apt repositiory try /usr/bin/git

– Stephen Boston
20 mins ago







Best to use full paths for executables in cron tabs. cron might be running in a sparse environment For standard Ubuntu with git installed from the apt repositiory try /usr/bin/git

– Stephen Boston
20 mins ago












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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f524343%2fcronjob-not-running-in-ubuntu-it-used-to-run-ok-under-debian%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
















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f524343%2fcronjob-not-running-in-ubuntu-it-used-to-run-ok-under-debian%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...