If you then make a crontab that runs the script every hour ( it will run your command every time 24 hours have passed since the last time it ran. # If the file is more than 24h old, run the command again # If the command succeeds, update the log file # If the log file doesn't exist, run your command # The command you want to run, change this to whatever Another solution would be to have your job create a file every time it is run and then write a script that checks the modification date of the file and runs the job again if it is more than a day old. Apparently, anacron can do this but I have never used it. Perhaps it will run the job next time it is turned on, but I doubt it. I'm not sure how cron will deal with if your computer is off at midnight. Run once, at Run once a year, "0 0 1 1 (same as Run once a month, "0 0 1 * Run once a week, "0 0 * * Run once a day, "0 0 * * (same as Run once an hour, "0 * * * *". We created Cronitor because cron itself cant alert you if your jobs fail or never start. Depending on your cron implementation you may be able to use From man cron: Instead of the first five fields, one of eight special strings may Cron job once a day is a commonly used cron schedule.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |