如何为每天某个时间执行的hangfire作业创建cron表达式

如何为每天某个时间执行的hangfire作业创建cron表达式,cron,hangfire,Cron,Hangfire,我不熟悉cron表达式。我只需要知道如何为Hangfire中的重复作业创建cron,该作业在每天下午5点、凌晨1点、下午2点45分执行 了解到Hangfire也接受标准的CronExpression,我尝试探索这个频率的cron表达式,但没有找到一个- 我知道15分钟怎么做*/15 * * * * 我需要每天运行它。cronjob schedular使用的一般语法是: # Execute the <b>command</b> every minute of every d

我不熟悉cron表达式。我只需要知道如何为Hangfire中的重复作业创建cron,该作业在每天下午5点、凌晨1点、下午2点45分执行

了解到Hangfire也接受标准的CronExpression,我尝试探索这个频率的cron表达式,但没有找到一个- 我知道15分钟怎么做*/15 * * * *
我需要每天运行它。

cronjob schedular使用的一般语法是:

# Execute the <b>command</b> every minute of every day.
* * * * * command
可以使用八个特殊字符串中的一个,而不是前五个字段:

string         meaning
------         -------
@reboot        Run once, at startup.
@yearly        Run once a year, "0 0 1 1 *".
@annually      (same as @yearly)
@monthly       Run once a month, "0 0 1 * *".
@weekly        Run once a week, "0 0 * * 0".
@daily         Run once a day, "0 0 * * *".
@midnight      (same as @daily)
@hourly        Run once an hour, "0 * * * *".
* 2,20 * * * command

# This will execute the job every minute but at the hours 2 AM and 8 PM.
要在使用间隔/后重复作业,请执行以下操作:

*/15 * * * * command

# This will execute the command after every 15 minutes.
为了在特定时间执行作业,可以使用“,”:

string         meaning
------         -------
@reboot        Run once, at startup.
@yearly        Run once a year, "0 0 1 1 *".
@annually      (same as @yearly)
@monthly       Run once a month, "0 0 1 * *".
@weekly        Run once a week, "0 0 * * 0".
@daily         Run once a day, "0 0 * * *".
@midnight      (same as @daily)
@hourly        Run once an hour, "0 * * * *".
* 2,20 * * * command

# This will execute the job every minute but at the hours 2 AM and 8 PM.
希望这能消除你的疑虑

我试着说:


谢谢。比如,如果我想一天运行两次作业(早上6点和下午6点),玉米会像*6,18***什么是参考?我需要获得更多详细信息。请访问以查看您创建的cron作业,这是一个很棒的站点。谢谢!伟大的网站,我建议去看看,我花了10分钟阅读,并试图了解其他的例子,但这个网站给了我20分钟,我需要的!关于
man crontab
的具体内容尚不清楚,您没有通过简单的搜索找到解释?